X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbadguy%2Fsspiky.hpp;h=49a48e24850f8a9ac3fcbd067d93f21b43658b26;hb=cb95eae480d25b207fc78d5bd1ec2209f25fe187;hp=b3a28ecd11d2c65e5bc92825d4a12f10d3640124;hpb=cbbcc7dfbaca831dc4cbf714ff54b246135f7625;p=supertux.git diff --git a/src/badguy/sspiky.hpp b/src/badguy/sspiky.hpp index b3a28ecd1..49a48e248 100644 --- a/src/badguy/sspiky.hpp +++ b/src/badguy/sspiky.hpp @@ -1,49 +1,46 @@ -// $Id: sspiky.hpp 2642 2005-06-26 13:38:53Z matzebraun $ -// // 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 -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. // // This program is distributed in the hope that it will be useful, // 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. +// along with this program. If not, see . -#ifndef __SSPIKY_H__ -#define __SSPIKY_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SSPIKY_HPP +#define HEADER_SUPERTUX_BADGUY_SSPIKY_HPP -#include "badguy.hpp" +#include "badguy/walking_badguy.hpp" -class SSpiky : public BadGuy +class SSpiky : public WalkingBadguy { public: - SSpiky(const lisp::Lisp& reader); + SSpiky(const Reader& reader); - void activate(); - void write(lisp::Writer& writer); - HitResponse collision_solid(GameObject& other, const CollisionHit& hit); + void initialize(); + 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; +protected: enum SSpikyState { SSPIKY_SLEEPING, SSPIKY_WAKING, SSPIKY_WALKING }; SSpikyState state; - }; #endif + +/* EOF */