adjusted the flying snowball's smoke trail
[supertux.git] / src / badguy / zeekling.hpp
index 7dc18af..1fee377 100644 (file)
@@ -1,7 +1,8 @@
 //  $Id$
-// 
-//  SuperTux
+//
+//  Zeekling - flyer that swoops down when she spots the player
 //  Copyright (C) 2005 Matthias Braun <matze@braunis.de>
+//  Copyright (C) 2006 Christoph Sommer <supertux@2006.expires.deltadevelopment.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
@@ -12,7 +13,7 @@
 //  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
@@ -32,12 +33,28 @@ public:
   void activate();
   void write(lisp::Writer& writer);
   HitResponse collision_solid(GameObject& other, const CollisionHit& hit);
+  void active_update(float elapsed_time);
 
 protected:
   bool collision_squished(Player& player);
   bool set_direction;
   Direction initial_direction;
   float speed;
+
+  Timer diveRecoverTimer;
+
+  enum ZeeklingState {
+    FLYING,
+    DIVING,
+    CLIMBING
+  };
+  ZeeklingState state;
+
+private:
+  bool should_we_dive();
+  void onBumpHorizontal();
+  void onBumpVertical();
+
 };
 
 #endif