X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fsspiky.hpp;h=b6a35ed84add4b978a0d56ee57b35d17bd6181d7;hb=13c84268f16872f9b442251c4175a3a1a7a7899a;hp=aa6c7958d981a19e3021054ed5dd40f218ec51e4;hpb=12966e3f986f7202125ae590c74a4d0c227441dd;p=supertux.git diff --git a/src/badguy/sspiky.hpp b/src/badguy/sspiky.hpp index aa6c7958d..b6a35ed84 100644 --- a/src/badguy/sspiky.hpp +++ b/src/badguy/sspiky.hpp @@ -20,33 +20,31 @@ #ifndef __SSPIKY_H__ #define __SSPIKY_H__ -#include "badguy.hpp" +#include "walking_badguy.hpp" -class SSpiky : public BadGuy +class SSpiky : public WalkingBadguy { public: SSpiky(const lisp::Lisp& reader); - void activate(); + void initialize(); void write(lisp::Writer& writer); - HitResponse collision_solid(GameObject& other, const CollisionHit& hit); + void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); void active_update(float elapsed_time); + void freeze(); + bool is_freezable() const; + virtual SSpiky* clone() const { return new SSpiky(*this); } protected: - Timer timer; - enum SSpikyState { SSPIKY_SLEEPING, SSPIKY_WAKING, SSPIKY_WALKING }; SSpikyState state; - std::string direction; - bool set_direction; - Direction initial_direction; }; #endif