17 #ifndef HEADER_SUPERTUX_OBJECT_LANTERN_HPP 18 #define HEADER_SUPERTUX_OBJECT_LANTERN_HPP 20 #include "object/rock.hpp" 33 virtual void grab(
MovingObject&
object,
const Vector& pos, Direction dir)
override;
34 virtual void ungrab(
MovingObject&
object, Direction dir)
override;
36 static std::string class_name() {
return "lantern"; }
37 virtual std::string get_class_name()
const override {
return class_name(); }
38 static std::string display_name() {
return _(
"Lantern"); }
43 virtual GameObjectTypes
get_types()
const override {
return {}; }
44 virtual void after_editor_set()
override;
51 void add_color(
const Color& c);
55 SpritePtr lightsprite;
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: lantern.hpp:40
bool is_open() const
returns true if lamp is currently open
Definition: lantern.cpp:146
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: lantern.hpp:39
Lantern.
Definition: lantern.hpp:23
Definition: object_settings.hpp:39
virtual GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: lantern.hpp:43
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: lantern.cpp:91
Color get_color() const
returns the lamp's color
Definition: lantern.hpp:50
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
Base class for all dynamic/moving game objects.
Definition: moving_object.hpp:35
virtual void grab(MovingObject &object, const Vector &pos, Direction dir) override
called each frame when the object has been grabbed.
Definition: lantern.cpp:123
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 HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: lantern.cpp:98
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: rock.hpp:42
Definition: reader_mapping.hpp:32
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