X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fbadguy%2Fmrtree.hpp;h=652a00e6bdb09cd16eecafc467c8e7b9b0b8c425;hb=7c2f8e23f9accd00bd9ee2319da8ab8aa341c7cf;hp=058e26141ab8da8189993c14c69ac63b27e353f4;hpb=f7f5fc0c794eb421d058b92f31add2adff18e2d7;p=supertux.git diff --git a/src/badguy/mrtree.hpp b/src/badguy/mrtree.hpp index 058e26141..652a00e6b 100644 --- a/src/badguy/mrtree.hpp +++ b/src/badguy/mrtree.hpp @@ -1,7 +1,7 @@ // $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,11 +12,10 @@ // 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 __MRTREE_H__ #define __MRTREE_H__ @@ -29,16 +28,21 @@ public: MrTree(const lisp::Lisp& reader); void activate(); + void active_update(float elapsed_time); void write(lisp::Writer& writer); HitResponse collision_solid(GameObject& other, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); + virtual MrTree* clone() const { return new MrTree(*this); } + protected: enum MyState { - STATE_BIG, STATE_NORMAL + STATE_BIG, STATE_INVINCIBLE, STATE_NORMAL }; MyState mystate; - + + Timer invincible_timer; + bool collision_squished(Player& player); };