17 #ifndef HEADER_SUPERTUX_OBJECT_THUNDERSTORM_HPP 18 #define HEADER_SUPERTUX_OBJECT_THUNDERSTORM_HPP 20 #include "squirrel/exposed_object.hpp" 21 #include "scripting/thunderstorm.hpp" 22 #include "supertux/game_object.hpp" 23 #include "supertux/timer.hpp" 36 virtual void update(
float dt_sec)
override;
39 virtual std::string get_class()
const override {
return "thunderstorm"; }
40 virtual std::string get_display_name()
const override {
return _(
"Thunderstorm"); }
44 virtual const std::string get_icon_path()
const override {
return "images/engine/editor/thunderstorm.png"; }
74 Timer time_to_thunder;
75 Timer time_to_lightning;
76 Timer flash_display_timer;
void stop()
Stop playing thunder and lightning at configured interval.
Definition: thunderstorm.cpp:118
This class binds a certain GameObject class to a scripting class.
Definition: exposed_object.hpp:45
void electrify()
Electrify water throughout the whole sector for a short time.
Definition: thunderstorm.cpp:147
Definition: object_settings.hpp:35
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: thunderstorm.cpp:78
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: thunderstorm.cpp:93
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
void start()
Start playing thunder and lightning at configured interval.
Definition: thunderstorm.cpp:109
void lightning()
Play lightning, i.e.
Definition: thunderstorm.cpp:133
Thunderstorm scriptable GameObject; plays thunder, lightning and electrifies water at regular interva...
Definition: thunderstorm.hpp:30
void flash()
Display a nice flash.
Definition: thunderstorm.cpp:140
void thunder()
Play thunder.
Definition: thunderstorm.cpp:127
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
Definition: reader_mapping.hpp:31
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42