/minild29

To get this branch, use:
bzr branch http://9ix.org/bzr/minild29

« back to all changes in this revision

Viewing changes to Dark.cpp

  • Committer: Josh C
  • Date: 2011-09-17 15:03:52 UTC
  • Revision ID: josh@9ix.org-20110917150352-j6nh9t61px2eitdu
skittering blue square

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    SetGraphic(sprite);
14
14
 
15
15
    AddTag("player");
16
 
 
17
 
    footsteps = Audio::NewDeck(Assets::RequestAudio("footsteps.ogg"));
18
 
    footsteps->SetLoops(0); //loop indefinitely
19
16
    
20
17
    SetCollider(new RectangleCollider(32, 32));
21
18
  }
68
65
      }
69
66
    if (ycol) {velocity.y = 0;}
70
67
 
71
 
    if (velocity.GetSquaredMagnitude() > 20)
72
 
      footsteps->Play();
73
 
    else
74
 
      footsteps->Pause(); //Stop()?
75
68
 
76
69
    //Scene::GetCamera()->position = position;
77
70
  }
152
145
      }
153
146
    if (ycol) {velocity.y = 0;}
154
147
 
155
 
    if (velocity.GetSquaredMagnitude() > 20)
 
148
    if (velocity.GetSquaredMagnitude() > 0)
156
149
      skitter1->Play();
157
150
    else
158
151
      skitter1->Pause(); //Stop()?
208
201
    creature->position = Graphics::GetScreenCenter();
209
202
    Add(creature);
210
203
 
211
 
    Creature *creature2 = new Creature;
212
 
    creature2->position = Graphics::GetScreenCenter();
213
 
    Add(creature2);
214
 
 
215
204
    Graphics::SetBackgroundColor(Color::green * 0.2f);
216
205
 
217
206
  }