}
void
-Totem::activate()
+Totem::initialize()
{
if (!carried_by) {
physic.set_velocity_x(dir == LEFT ? -WALKSPEED : WALKSPEED);
if (on_ground() && might_fall())
{
dir = (dir == LEFT ? RIGHT : LEFT);
- activate();
+ initialize();
}
Sector* s = Sector::current();
// If we are hit from the direction we are facing: turn around
if (hit.left && (dir == LEFT)) {
dir = RIGHT;
- activate();
+ initialize();
}
if (hit.right && (dir == RIGHT)) {
dir = LEFT;
- activate();
+ initialize();
}
}
// If we are hit from the direction we are facing: turn around
if(hit.left && (dir == LEFT)) {
dir = RIGHT;
- activate();
+ initialize();
}
if(hit.right && (dir == RIGHT)) {
dir = LEFT;
- activate();
+ initialize();
}
return CONTINUE;
target->carrying = this;
this->carried_by = target;
- this->activate();
+ this->initialize();
bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
sound_manager->play( LAND_ON_TOTEM_SOUND , get_pos());
this->carried_by = 0;
- this->activate();
+ this->initialize();
bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());