X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbadguy%2Fsnail.hpp;h=0d31ca8c401fa546aa0a72ca06dd9b4525935d8c;hb=38e4d5afd0cc150f75d57778ff1ab1a55688e2f4;hp=3f56e227dd251734685ac85819176d815d4f3e5b;hpb=5b6a79df7b102dba6322bc923ece8c572ea56775;p=supertux.git diff --git a/src/badguy/snail.hpp b/src/badguy/snail.hpp index 3f56e227d..0d31ca8c4 100644 --- a/src/badguy/snail.hpp +++ b/src/badguy/snail.hpp @@ -20,28 +20,29 @@ #ifndef __SNAIL_H__ #define __SNAIL_H__ -#include "badguy.hpp" +#include "walking_badguy.hpp" /** * Badguy "Snail" - a snail-like creature that can be flipped and tossed around at an angle */ -class Snail : public BadGuy +class Snail : public WalkingBadguy { public: Snail(const lisp::Lisp& reader); Snail(const Vector& pos, Direction d); - void activate(); + void initialize(); void write(lisp::Writer& writer); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); + bool can_break(); void active_update(float elapsed_time); virtual Snail* clone() const { return new Snail(*this); } protected: - bool collision_squished(Player& player); + bool collision_squished(GameObject& object); void be_normal(); /**< switch to state STATE_NORMAL */ void be_flat(); /**< switch to state STATE_FLAT */ void be_kicked(); /**< switch to state STATE_KICKED_DELAY */ @@ -57,8 +58,6 @@ private: Timer flat_timer; /**< wait time until flipping right-side-up again */ Timer kicked_delay_timer; /**< wait time until switching from STATE_KICKED_DELAY to STATE_KICKED */ int squishcount; - bool recently_changed_direction; }; #endif -