X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fskullyhop.hpp;h=5698fe625c0a3e5142fafd38e4e60c4aa05daf7a;hb=12a28b64dcce9c7ff706451b4f3aecd201cc8a5f;hp=02624b7c0afca104f7e1cbe3cd521b462b59e011;hpb=4c676c4c0c70f0efa7f1536b92de01976b1977a0;p=supertux.git diff --git a/src/badguy/skullyhop.hpp b/src/badguy/skullyhop.hpp index 02624b7c0..5698fe625 100644 --- a/src/badguy/skullyhop.hpp +++ b/src/badguy/skullyhop.hpp @@ -1,12 +1,10 @@ -// $Id$ -// // SkullyHop - A Hopping Skull // Copyright (C) 2006 Christoph Sommer // -// 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 @@ -14,14 +12,12 @@ // 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 __SKULLYHOP_H__ -#define __SKULLYHOP_H__ +#ifndef HEADER_SUPERTUX_BADGUY_SKULLYHOP_HPP +#define HEADER_SUPERTUX_BADGUY_SKULLYHOP_HPP -#include "badguy.hpp" +#include "badguy/badguy.hpp" /** * Badguy "SkullyHop" - A Hopping Skull @@ -29,29 +25,30 @@ class SkullyHop : public BadGuy { public: - SkullyHop(const lisp::Lisp& reader); + SkullyHop(const Reader& reader); SkullyHop(const Vector& pos, Direction d); - void activate(); - void write(lisp::Writer& writer); + void initialize(); void collision_solid(const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); bool collision_squished(GameObject& object); void active_update(float elapsed_time); - virtual SkullyHop* clone() const { return new SkullyHop(*this); } - -protected: +private: enum SkullyHopState { STANDING, CHARGING, JUMPING }; +private: + void set_state(SkullyHopState newState); + +private: Timer recover_timer; SkullyHopState state; - - void set_state(SkullyHopState newState); }; #endif + +/* EOF */