static const float WALKSPEED = 80;
SSpiky::SSpiky(const lisp::Lisp& reader)
- : WalkingBadguy(reader, "images/creatures/spiky/sleepingspiky.sprite", "left", "right"), state(SSPIKY_SLEEPING)
+ : WalkingBadguy(reader, "images/creatures/spiky/sleepingspiky.sprite", "left", "right"), state(SSPIKY_SLEEPING)
{
walk_speed = WALKSPEED;
max_drop_height = -1;
}
void
-SSpiky::activate()
+SSpiky::initialize()
{
state = SSPIKY_SLEEPING;
- physic.vx = 0;
+ physic.set_velocity_x(0);
sprite->set_action(dir == LEFT ? "sleeping-left" : "sleeping-right");
}
if(sprite->animation_done()) {
// start walking
state = SSPIKY_WALKING;
- WalkingBadguy::activate();
+ WalkingBadguy::initialize();
}
BadGuy::active_update(elapsed_time);