/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:
83
83
  {
84
84
    sprite = new SpriteAnimation("creature.png", FILTER_NONE, 64, 64);
85
85
    sprite->Add("idle", 0, 0, 0.35f);
86
 
    sprite->Add("move", 1, 2, 4.0f);
87
86
    sprite->Play("idle");
88
87
    SetGraphic(sprite);
89
88
 
154
153
    if (ycol) {velocity.y = 0;}
155
154
 
156
155
    if (velocity.GetSquaredMagnitude() > 20)
157
 
      {
158
 
        skitter1->Play();
159
 
        sprite->Play("move");
160
 
      }
 
156
      skitter1->Play();
161
157
    else
162
 
      {
163
 
        skitter1->Pause(); //Stop()?
164
 
        sprite->Play("idle");
165
 
      }
 
158
      skitter1->Pause(); //Stop()?
166
159
  }
167
160
 
168
161
  // Scene
219
212
    creature2->position = Graphics::GetScreenCenter();
220
213
    Add(creature2);
221
214
 
222
 
    Graphics::SetBackgroundColor(Color::black * 0.2f);
 
215
    Graphics::SetBackgroundColor(Color::green * 0.2f);
223
216
 
224
217
  }
225
218