#303: Typo fixes from mathnerd314
[supertux.git] / src / scripting / player.hpp
index 34a6d1f..92d15f8 100644 (file)
@@ -35,21 +35,21 @@ public:
    * Set tux bonus.
    * This can be "grow", "fireflower" or "iceflower" at the moment
    */
-  virtual void add_bonus(const std::string& bonus) = 0;
+  virtual bool add_bonus(const std::string& bonus) = 0;
   /**
    * Give tux more coins
    */
   virtual void add_coins(int count) = 0;
   /**
-   * Make tux invicible for a short amount of time
+   * Make tux invincible for a short amount of time
    */
   virtual void make_invincible() = 0;
   /**
-   * Deactivate user input for Tux
+   * Deactivate user/scripting input for Tux
    */
   virtual void deactivate() = 0;
   /**
-   * Give control back to user
+   * Give control back to user/scripting
    */
   virtual void activate() = 0;
   /**
@@ -57,12 +57,12 @@ public:
    */
   virtual void walk(float speed) = 0;
   /**
-   * Set player visible or not visible
+   * Set player visible or invisible
    */
   virtual void set_visible(bool visible) = 0;
   /**
    * returns true if the player is currently visible (that is he was not set
-   * inivisible by the set_visible method)
+   * invisible by the set_visible method)
    */
   virtual bool get_visible() = 0;
 
@@ -73,7 +73,7 @@ public:
   virtual void kill(bool completely) = 0;
 
   /**
-   * Switches ghost mode on/off. 
+   * Switches ghost mode on/off.
    * Lets Tux float around and through solid objects.
    */
   virtual void set_ghost_mode(bool enable) = 0;
@@ -83,9 +83,51 @@ public:
    */
   virtual bool get_ghost_mode() = 0;
 
+  /**
+   * play cheer animation.
+   * This might need some space and behave in an unpredictable way. Best to use this at level end.
+   */
+  virtual void do_cheer() = 0;
+
+  /**
+   * duck down if possible.
+   * this won't last long as long as input is enabled.
+   */
+  virtual void do_duck() = 0;
+
+  /**
+   * stand back up if possible.
+   */
+  virtual void do_standup() = 0;
+
+  /**
+   * do a backflip if possible.
+   */
+  virtual void do_backflip() = 0;
+
+  /**
+   * jump in the air if possible
+   * sensible values for yspeed are negative - unless we want to jump into the ground of course
+   */
+  virtual void do_jump(float yspeed) = 0;
+
+  /**
+   * Orders the current GameSession to start a sequence
+   */
+  virtual void trigger_sequence(std::string sequence_name) = 0;
+
+  /**
+   * Uses a scriptable controller for all user input (or restores controls)
+   */
+  virtual void use_scripting_controller(bool use_or_release) = 0;
+
+  /**
+   * Instructs the scriptable controller to press or release a button 
+   */
+  virtual void do_scripting_controller(std::string control, bool pressed) = 0;
+
 };
 
 }
 
 #endif
-