Made buttjump a bit easier to perform
[supertux.git] / src / badguy / walking_badguy.hpp
index f8afc50..f5a7eb6 100644 (file)
 
 #include "badguy.hpp"
 
+class Timer;
+
 /**
- * Baseclass for a Badguy that just walks around.
+ * Base class for Badguys that walk on the floor.
  */
 class WalkingBadguy : public BadGuy
 {
@@ -32,7 +34,7 @@ public:
   WalkingBadguy(const Vector& pos, Direction direction, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer = LAYER_OBJECTS);
   WalkingBadguy(const lisp::Lisp& reader, const std::string& sprite_name, const std::string& walk_left_action, const std::string& walk_right_action, int layer = LAYER_OBJECTS);
 
-  void activate();
+  void initialize();
   void write(lisp::Writer& writer);
   void active_update(float elapsed_time);
   void collision_solid(const CollisionHit& hit);
@@ -50,6 +52,8 @@ protected:
   std::string walk_right_action;
   float walk_speed;
   int max_drop_height; /**< Maximum height of drop before we will turn around, or -1 to just drop from any ledge */
+  Timer turn_around_timer;
+  int turn_around_counter; /**< counts number of turns since turn_around_timer was started */
 };
 
 #endif