static const float THROW_VELOCITY = 400; /**< initial velocity of thrown rocks */
Mole::Mole(const lisp::Lisp& reader)
- : BadGuy(reader, "images/creatures/mole/mole.sprite", LAYER_TILES-1), state(PRE_THROWING)
+ : BadGuy(reader, "images/creatures/mole/mole.sprite", LAYER_TILES-1), state(PRE_THROWING)
{
physic.enable_gravity(false);
sound_manager->preload("sounds/fall.wav");
}
Mole::Mole(const Vector& pos)
- : BadGuy(pos, "images/creatures/mole/mole.sprite", LAYER_TILES-1), state(PRE_THROWING)
+ : BadGuy(pos, "images/creatures/mole/mole.sprite", LAYER_TILES-1), state(PRE_THROWING)
{
physic.enable_gravity(false);
sound_manager->preload("sounds/fall.wav");
switch (state) {
case PRE_THROWING:
if (timer.check()) {
- set_state(THROWING);
+ set_state(THROWING);
}
break;
case THROWING:
if (throw_timer.check()) {
throw_rock();
- throw_timer.start(THROW_INTERVAL);
+ throw_timer.start(THROW_INTERVAL);
}
if (timer.check()) {
- set_state(POST_THROWING);
+ set_state(POST_THROWING);
}
break;
case POST_THROWING:
if (timer.check()) {
- set_state(PEEKING);
+ set_state(PEEKING);
}
break;
case PEEKING:
if (sprite->animation_done()) {
- set_state(PRE_THROWING);
+ set_state(PRE_THROWING);
}
break;
case DEAD: