- if(frozen) unfreeze();
- Player* player = dynamic_cast<Player*>(&object);
- if (player) {
- player->bounce(*this);
- }
- if (state == STATE_IDLE) {
- if (player && countMe) Sector::current()->get_level()->stats.badguys++;
- state = STATE_TICKING;
-
- // TODO: currently we need to re-create ticking sound object every time, in case we had to stop it
- ticking.reset(sound_manager->create_sound_source("sounds/fizz.wav"));
- ticking->set_position(get_pos());
- ticking->set_looping(true);
- ticking->set_gain(2.0);
- ticking->set_reference_distance(32);
-
- ticking->play();
- ticking_timer.start(TICKING_TIME);
- walk_left_action = "ticking-left";
- walk_right_action = "ticking-right";
- sprite->set_action(dir == LEFT ? walk_left_action : walk_right_action);