17 #ifndef HEADER_SUPERTUX_OBJECT_LEVEL_TIME_HPP 18 #define HEADER_SUPERTUX_OBJECT_LEVEL_TIME_HPP 20 #include "squirrel/exposed_object.hpp" 21 #include "scripting/level_time.hpp" 22 #include "supertux/game_object.hpp" 23 #include "video/color.hpp" 24 #include "video/surface_ptr.hpp" 31 static Color text_color;
35 virtual void update(
float dt_sec)
override;
54 virtual std::string get_class()
const override {
return "leveltime"; }
55 virtual std::string get_display_name()
const override {
return _(
"Level time"); }
59 virtual const std::string get_icon_path()
const override {
return "images/engine/editor/clock.png"; }
62 SurfacePtr time_surface;
float get_time() const
Returns the number of seconds left on the clock.
Definition: level_time.cpp:118
Definition: level_time.hpp:28
This class binds a certain GameObject class to a scripting class.
Definition: exposed_object.hpp:45
Definition: object_settings.hpp:35
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: level_time.cpp:78
void stop()
Pauses the countdown.
Definition: level_time.cpp:112
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
void set_time(float time_left)
Changes the number of seconds left on the clock.
Definition: level_time.cpp:124
void start()
Resumes the countdown.
Definition: level_time.cpp:106
Definition: reader_mapping.hpp:31
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: level_time.cpp:58