From: Mathnerd314 Date: Fri, 9 Apr 2010 22:49:45 +0000 (+0000) Subject: Bell sound from remaxim (plays on torch/firefly too) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=254072e533e5da18ed1757a56b50ebfbe4238613;p=supertux.git Bell sound from remaxim (plays on torch/firefly too) SVN-Revision: 6631 --- diff --git a/data/sounds/savebell2.wav b/data/sounds/savebell2.wav new file mode 100644 index 000000000..05ed4f512 Binary files /dev/null and b/data/sounds/savebell2.wav differ diff --git a/src/object/firefly.cpp b/src/object/firefly.cpp index 93901642d..e699cd25a 100644 --- a/src/object/firefly.cpp +++ b/src/object/firefly.cpp @@ -18,6 +18,7 @@ #include +#include "audio/sound_manager.hpp" #include "math/random_generator.hpp" #include "object/player.hpp" #include "object/sprite_particle.hpp" @@ -45,6 +46,9 @@ Firefly::Firefly(const Reader& lisp) : sprite = sprite_manager->create( sprite_name ); bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height()); reactivate(); + + //Load sound + sound_manager->preload("sounds/savebell2.wav"); } void @@ -81,7 +85,9 @@ Firefly::collision(GameObject& other, const CollisionHit& ) Vector paccel = Vector(0, 1000); Sector::current()->add_object(new SpriteParticle("images/objects/particles/reset.sprite", "default", ppos, ANCHOR_MIDDLE, pspeed, paccel, LAYER_OBJECTS-1)); } - // TODO play sound + + sound_manager->play("sounds/savebell2.wav"); + sprite->set_action("ringing"); GameSession::current()->set_reset_point(Sector::current()->get_name(), initial_position);