17 #ifndef HEADER_SUPERTUX_OBJECT_LANTERN_HPP 18 #define HEADER_SUPERTUX_OBJECT_LANTERN_HPP 20 #include "object/rock.hpp" 34 virtual void ungrab(
MovingObject&
object, Direction dir)
override;
36 virtual std::string get_class()
const override {
return "lantern"; }
37 virtual std::string get_display_name()
const override {
return _(
"Lantern"); }
40 virtual void after_editor_set()
override;
47 void add_color(
const Color& c);
51 SpritePtr lightsprite;
Simple two dimensional vector.
Definition: vector.hpp:24
bool is_open() const
returns true if lamp is currently open
Definition: lantern.cpp:142
Lantern.
Definition: lantern.hpp:23
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: lantern.cpp:89
Color get_color() const
returns the lamp's color
Definition: lantern.hpp:46
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
Base class for all dynamic/moving game objects.
Definition: moving_object.hpp:31
virtual void grab(MovingObject &object, const Vector &pos, Direction dir) override
called each frame when the object has been grabbed.
Definition: lantern.cpp:119
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: lantern.cpp:96
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