X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fthunderstorm.hpp;h=fcfba4879d7864ea286bf1155d52bb0d55625a1f;hb=75acd4b141f45e851a492f089aa9ad24a9552409;hp=804312f4c67ae9a7f5f74821a97043e318c67779;hpb=fe875e6f18c4ed968f7b1534b4039c8a580b852b;p=supertux.git diff --git a/src/object/thunderstorm.hpp b/src/object/thunderstorm.hpp index 804312f4c..fcfba4879 100644 --- a/src/object/thunderstorm.hpp +++ b/src/object/thunderstorm.hpp @@ -29,7 +29,7 @@ /** * Thunderstorm scriptable GameObject; plays thunder, lightning and electrifies water at regular interval */ -class Thunderstorm : public GameObject, public Scripting::Thunderstorm, public ScriptInterface +class Thunderstorm : public GameObject, public ScriptInterface { public: Thunderstorm(const lisp::Lisp& reader); @@ -41,10 +41,15 @@ public: virtual void unexpose(HSQUIRRELVM vm, SQInteger table_idx); /** + * @name Scriptable Methods + * @{ + */ + + /** * Start playing thunder and lightning at configured interval */ void start(); - + /** * Stop playing thunder and lightning at configured interval */ @@ -70,15 +75,18 @@ public: */ void electrify(); + /** + * @} + */ + private: - std::string name; /**< user-defined name for use in scripts or empty string if not scriptable */ bool running; /**< whether we currently automatically trigger lightnings */ float interval; /**< time between two lightnings */ - + int layer; /**< layer, where flash will be painted */ + Timer time_to_thunder; /**< counts down until next thunder */ Timer time_to_lightning; /**< counts down until next lightning */ Timer flash_display_timer; /**< counts down while flash is displayed */ }; #endif -