// SuperTux
-// Copyright (C) 2010 Ingo Ruhnke <grumbel@gmx.de>
+// Copyright (C) 2010 Ingo Ruhnke <grumbel@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
WalkingBadguy(reader, "images/creatures/snowman/snowman.sprite", "walk-left", "walk-right")
{
walk_speed = 40;
- sound_manager->preload("sounds/pop.ogg");
+ SoundManager::current()->preload("sounds/pop.ogg");
}
void
physic.set_acceleration_y(0);
physic.enable_gravity(true);
set_state (STATE_FALLING);
+ countMe = false;
/* Create a new snowball where the snowman's head was */
- SnowBall* snowball = new SnowBall(snowball_pos, dir, dead_script);
+ auto snowball = std::make_shared<SnowBall>(snowball_pos, dir, dead_script);
Sector::current()->add_object(snowball);
}
// fire bullets destroy snowman's body
loose_head();
- sound_manager->play("sounds/pop.ogg", get_pos()); // this could be a different sound
+ SoundManager::current()->play("sounds/pop.ogg", get_pos()); // this could be a different sound
bullet.remove_me();
return ABORT_MOVE;
if (player)
player->bounce(*this);
- sound_manager->play("sounds/pop.ogg", get_pos());
+ SoundManager::current()->play("sounds/pop.ogg", get_pos());
loose_head();