-// $Id: stumpy.cpp 3980 2006-07-10 19:55:56Z sommer $
+// $Id$
//
// SuperTux
// Copyright (C) 2006 Matthias Braun <matze@braunis.de>
}
void
-Stumpy::activate()
+Stumpy::initialize()
{
switch (mystate) {
case STATE_INVINCIBLE:
sprite->set_action(dir == LEFT ? "dizzy-left" : "dizzy-right");
bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
- physic.vx = 0;
+ physic.set_velocity_x(0);
break;
case STATE_NORMAL:
- WalkingBadguy::activate();
+ WalkingBadguy::initialize();
break;
}
}
case STATE_INVINCIBLE:
if (invincible_timer.check()) {
mystate = STATE_NORMAL;
- WalkingBadguy::activate();
+ WalkingBadguy::initialize();
}
BadGuy::active_update(elapsed_time);
break;
switch (mystate) {
case STATE_INVINCIBLE:
if(hit.top || hit.bottom) {
- physic.vy = 0;
+ physic.set_velocity_y(0);
}
if(hit.left || hit.right) {
- physic.vx = 0;
+ physic.set_velocity_x(0);
}
break;
case STATE_NORMAL:
switch (mystate) {
case STATE_INVINCIBLE:
if(hit.top || hit.bottom) {
- physic.vy = 0;
+ physic.set_velocity_y(0);
}
if(hit.left || hit.right) {
- physic.vx = 0;
+ physic.set_velocity_x(0);
}
return CONTINUE;
break;