SkullyHop::SkullyHop(const lisp::Lisp& reader)
: BadGuy(reader, "images/creatures/skullyhop/skullyhop.sprite")
{
- has_initial_direction = false;
}
SkullyHop::SkullyHop(const Vector& pos, Direction d)
- : BadGuy(pos, "images/creatures/skullyhop/skullyhop.sprite")
+ : BadGuy(pos, d, "images/creatures/skullyhop/skullyhop.sprite")
{
- has_initial_direction = true;
- initial_direction = d;
}
void
void
SkullyHop::activate()
{
- if (has_initial_direction) dir = initial_direction;
-
// initial state is JUMPING, because we might start airborne
state = JUMPING;
sprite->set_action(dir == LEFT ? "jumping-left" : "jumping-right");