X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbadguy%2Fjumpy.cpp;h=7a6eaaaddedddcce304a4ea55998e3139f2b01ac;hb=35fa1ef8cc5d73d7b6d0a13873e3eadf35d873f5;hp=ad63c49a23be1471d5414a09592f9cf0a7b09d98;hpb=08813a74da6ac1fd045a105e4e8105f1d7f716f0;p=supertux.git diff --git a/src/badguy/jumpy.cpp b/src/badguy/jumpy.cpp index ad63c49a2..7a6eaaadd 100644 --- a/src/badguy/jumpy.cpp +++ b/src/badguy/jumpy.cpp @@ -20,17 +20,17 @@ #include "sprite/sprite.hpp" #include "supertux/object_factory.hpp" -static const float JUMPSPEED=-600; +static const float JUMPYSPEED=-600; static const float JUMPY_MID_TOLERANCE=4; static const float JUMPY_LOW_TOLERANCE=2; Jumpy::Jumpy(const Reader& reader) : - BadGuy(reader, "images/creatures/snowjumpy/snowjumpy.sprite"), + BadGuy(reader, "images/creatures/snowjumpy/snowjumpy.sprite"), pos_groundhit(), groundhit_pos_set(false) { // TODO create a nice sound for this... - //sound_manager->preload("sounds/skid.wav"); + //SoundManager::current()->preload("sounds/skid.wav"); } void @@ -55,9 +55,9 @@ Jumpy::hit(const CollisionHit& chit) groundhit_pos_set = true; } - physic.set_velocity_y((frozen || get_state() == STATE_FALLING) ? 0 : JUMPSPEED); + physic.set_velocity_y((frozen || get_state() == STATE_FALLING) ? 0 : JUMPYSPEED); // TODO create a nice sound for this... - //sound_manager->play("sounds/skid.wav"); + //SoundManager::current()->play("sounds/skid.wav"); } else if(chit.top) { physic.set_velocity_y(0); } @@ -99,7 +99,6 @@ Jumpy::freeze() { BadGuy::freeze(); physic.set_velocity_y(std::max(0.0f, physic.get_velocity_y())); - sprite->set_action(dir == LEFT ? "left-iced" : "right-iced"); } bool @@ -108,6 +107,4 @@ Jumpy::is_freezable() const return true; } -IMPLEMENT_FACTORY(Jumpy, "jumpy"); - /* EOF */