X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fplayer.hpp;h=92d15f8dc710f3b48aeb11b7ccd294ec0ed9ff9f;hb=86e5914510fc29f4decbb66a7d602872b6c8555e;hp=5fe871340ad11a2d2925ed43e1492e24c2261c1f;hpb=fea3446f05e1e7673607b835c269d3e8d1929ab3;p=supertux.git diff --git a/src/scripting/player.hpp b/src/scripting/player.hpp index 5fe871340..92d15f8dc 100644 --- a/src/scripting/player.hpp +++ b/src/scripting/player.hpp @@ -41,15 +41,15 @@ public: */ 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; @@ -116,6 +116,16 @@ public: */ 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; + }; }