X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fsspiky.hpp;h=b6a35ed84add4b978a0d56ee57b35d17bd6181d7;hb=13c84268f16872f9b442251c4175a3a1a7a7899a;hp=b3a28ecd11d2c65e5bc92825d4a12f10d3640124;hpb=cbbcc7dfbaca831dc4cbf714ff54b246135f7625;p=supertux.git diff --git a/src/badguy/sspiky.hpp b/src/badguy/sspiky.hpp index b3a28ecd1..b6a35ed84 100644 --- a/src/badguy/sspiky.hpp +++ b/src/badguy/sspiky.hpp @@ -1,7 +1,7 @@ -// $Id: sspiky.hpp 2642 2005-06-26 13:38:53Z matzebraun $ -// +// $Id$ +// // SuperTux -// Copyright (C) 2005 Matthias Braun +// Copyright (C) 2006 Matthias Braun // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -12,38 +12,39 @@ // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -// 02111-1307, USA. +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #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); -protected: - Timer timer; + void freeze(); + bool is_freezable() const; + virtual SSpiky* clone() const { return new SSpiky(*this); } + +protected: enum SSpikyState { SSPIKY_SLEEPING, SSPIKY_WAKING, SSPIKY_WALKING }; SSpikyState state; - }; #endif