Tux can peek to the left and to the right as far as the camera would move in best...
[supertux.git] / src / object / player.hpp
index d4645a1..b7fb3ac 100644 (file)
@@ -95,6 +95,7 @@ private:
   bool dying;
   bool backflipping;
   int  backflip_direction;
+  Direction peeking;
   
 public:
   Direction dir;
@@ -146,6 +147,10 @@ public:
   {
     return dying;
   }
+  Direction peeking_direction() const
+  {
+    return peeking;
+  }
   
   void kill(bool completely);
   void check_bounds(Camera* camera);
@@ -162,6 +167,34 @@ public:
   // set kick animation
   void kick();
 
+  /** 
+   * play cheer animation.
+   * This might need some space and behave in an unpredictable way. Best to use this at level end.
+   */
+  void do_cheer();
+
+  /**
+   * duck down if possible.
+   * this won't last long as long as input is enabled.
+   */
+  void do_duck();
+
+  /**
+   * stand back up if possible.
+   */
+  void do_standup();
+
+  /**
+   * do a backflip if possible.
+   */
+  void do_backflip();
+
+  /**
+   * jump in the air if possible
+   * sensible values for yspeed are negative - unless we want to jump into the ground of course
+   */
+  void do_jump(float yspeed);
+
   /**
    * Adds velocity to the player (be carefull when using this)
    */
@@ -219,6 +252,11 @@ private:
   void deactivate();
   void walk(float speed);
 
+  /**
+   * slows Tux down a little, based on where he's standing
+   */
+  void apply_friction();
+
   bool visible;
 
   Portable* grabbed_object;