/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:42:47 UTC
  • Revision ID: josh@9ix.org-20110917154247-vdk48n09rbnrmzgg
footsteps

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
16
19
    
17
20
    SetCollider(new RectangleCollider(32, 32));
18
21
  }
65
68
      }
66
69
    if (ycol) {velocity.y = 0;}
67
70
 
 
71
    if (velocity.GetSquaredMagnitude() > 20)
 
72
      footsteps->Play();
 
73
    else
 
74
      footsteps->Pause(); //Stop()?
68
75
 
69
76
    //Scene::GetCamera()->position = position;
70
77
  }
145
152
      }
146
153
    if (ycol) {velocity.y = 0;}
147
154
 
148
 
    if (velocity.GetSquaredMagnitude() > 0)
 
155
    if (velocity.GetSquaredMagnitude() > 20)
149
156
      skitter1->Play();
150
157
    else
151
158
      skitter1->Pause(); //Stop()?
201
208
    creature->position = Graphics::GetScreenCenter();
202
209
    Add(creature);
203
210
 
 
211
    Creature *creature2 = new Creature;
 
212
    creature2->position = Graphics::GetScreenCenter();
 
213
    Add(creature2);
 
214
 
204
215
    Graphics::SetBackgroundColor(Color::green * 0.2f);
205
216
 
206
217
  }