18 #ifndef HEADER_SUPERTUX_OBJECT_TORCH_HPP 19 #define HEADER_SUPERTUX_OBJECT_TORCH_HPP 21 #include "squirrel/exposed_object.hpp" 22 #include "scripting/torch.hpp" 23 #include "sprite/sprite_ptr.hpp" 24 #include "supertux/moving_object.hpp" 36 virtual void update(
float)
override;
40 virtual std::string get_class()
const override {
return "torch"; }
41 virtual std::string get_display_name()
const override {
return _(
"Torch"); }
44 virtual void after_editor_set()
override;
56 SpritePtr m_flame_glow;
57 SpritePtr m_flame_light;
59 std::string sprite_name;
void set_burning(bool burning_)
true: light torch, false: extinguish torch
Definition: torch.cpp:108
This class binds a certain GameObject class to a scripting class.
Definition: exposed_object.hpp:45
Definition: object_settings.hpp:35
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
bool get_burning() const
returns true if torch is lighted
Definition: torch.cpp:102
virtual void update(float) override
This function is called once per frame and allows the object to update it's state.
Definition: torch.cpp:68
Base class for all dynamic/moving game objects.
Definition: moving_object.hpp:31
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: torch.cpp:50
Definition: reader_mapping.hpp:31
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
virtual HitResponse collision(GameObject &other, const CollisionHit &) override
this function is called when the object collided with any other object
Definition: torch.cpp:73