17 #ifndef HEADER_SUPERTUX_OBJECT_AMBIENT_LIGHT_HPP 18 #define HEADER_SUPERTUX_OBJECT_AMBIENT_LIGHT_HPP 20 #include "supertux/game_object.hpp" 22 #include "video/color.hpp" 30 virtual void update(
float dt_sec)
override;
35 static std::string class_name() {
return "ambient-light"; }
36 virtual std::string get_class_name()
const override {
return class_name(); }
37 static std::string display_name() {
return _(
"Ambient Light"); }
39 virtual const std::string get_icon_path()
const override {
return "images/engine/editor/ambient_light.png"; }
44 void set_ambient_light(
const Color& ambient_light);
45 Color get_ambient_light()
const;
51 Color m_ambient_light;
54 bool m_ambient_light_fading;
57 Color m_source_ambient_light;
60 Color m_target_ambient_light;
63 float m_ambient_light_fade_duration;
66 float m_ambient_light_fade_accum;
void fade_to_ambient_light(float red, float green, float blue, float seconds)
Fades to the target ambient light.
Definition: ambient_light.cpp:102
virtual bool is_singleton() const override
If true only a single object of this type is allowed in a given GameObjectManager.
Definition: ambient_light.hpp:33
Definition: ambient_light.hpp:24
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: ambient_light.cpp:58
Definition: object_settings.hpp:39
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: ambient_light.hpp:38
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: ambient_light.hpp:40
virtual GameObjectClasses get_class_types() const
List notable classes in inheritance hierarchy of class.
Definition: game_object.cpp:113
A helper structure to list all the type_indexes of the classes in the type hierarchy of a given class...
Definition: game_object.hpp:57
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: ambient_light.cpp:84
Definition: reader_mapping.hpp:32
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42