17 #ifndef HEADER_SUPERTUX_OBJECT_CANDLE_HPP 18 #define HEADER_SUPERTUX_OBJECT_CANDLE_HPP 20 #include "object/moving_sprite.hpp" 33 static void register_class(ssq::VM& vm);
40 static std::string class_name() {
return "candle"; }
41 virtual std::string get_class_name()
const override {
return class_name(); }
42 virtual std::string get_exposed_class_name()
const override {
return "Candle"; }
43 static std::string display_name() {
return _(
"Candle"); }
48 virtual void after_editor_set()
override;
50 virtual void on_flip(
float height)
override;
73 SpritePtr candle_light_1;
74 SpritePtr candle_light_2;
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: candle.cpp:86
void puff_smoke()
Spawns a puff of smoke.
Definition: candle.cpp:112
Definition: object_settings.hpp:39
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: candle.hpp:45
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: moving_sprite.hpp:60
A burning candle: Simple, scriptable level decoration.
Definition: candle.hpp:30
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
bool get_burning() const
Returns ""true"" if the candle is lit up.
Definition: candle.cpp:125
void set_burning(bool burning)
Sets the burning state of the candle.
Definition: candle.cpp:131
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: candle.cpp:106
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 std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: candle.hpp:44
Definition: reader_mapping.hpp:32
Abstract base class for ""MovingObject""s, that are represented by a sprite.
Definition: moving_sprite.hpp:33
virtual void on_flip(float height) override
When level is flipped vertically.
Definition: candle.cpp:145
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
This class collects data about a collision.
Definition: collision_hit.hpp:44