static const float FISH_WAIT_TIME = 1;
Fish::Fish(const lisp::Lisp& reader)
- : BadGuy(reader, "images/creatures/fish/fish.sprite", LAYER_TILES-1), stop_y(0)
+ : BadGuy(reader, "images/creatures/fish/fish.sprite", LAYER_TILES-1), stop_y(0)
{
physic.enable_gravity(true);
}
Fish::Fish(const Vector& pos)
- : BadGuy(pos, "images/creatures/fish/fish.sprite", LAYER_TILES-1), stop_y(0)
+ : BadGuy(pos, "images/creatures/fish/fish.sprite", LAYER_TILES-1), stop_y(0)
{
physic.enable_gravity(true);
}
if(waiting.started())
return;
- BadGuy::draw(context);
+ if (get_state() == STATE_FALLING) {
+ sprite->set_action("down");
+ sprite->draw(context, get_pos(), layer);
+ }
+ else if (get_state() == STATE_ACTIVE) {
+ sprite->draw(context, get_pos(), layer);
+ }
}
HitResponse