24 #ifndef HEADER_SUPERTUX_OBJECT_MAGICBLOCK_HPP 25 #define HEADER_SUPERTUX_OBJECT_MAGICBLOCK_HPP 27 #include "object/moving_sprite.hpp" 38 virtual void update(
float dt_sec)
override;
40 virtual std::string get_class()
const override {
return "magicblock"; }
41 virtual std::string get_display_name()
const override {
return _(
"Magic block"); }
44 virtual void after_editor_set()
override;
49 float m_trigger_green;
55 std::shared_ptr<Color> m_light;
Simple two dimensional vector.
Definition: vector.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: magicblock.cpp:119
Definition: magicblock.hpp:31
Definition: object_settings.hpp:35
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
virtual bool collides(GameObject &other, const CollisionHit &hit) const override
when 2 objects collided, we will first call the pre_collision_check functions of both objects that ca...
Definition: magicblock.cpp:196
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: magicblock.cpp:186
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: magicblock.cpp:202
Definition: reader_mapping.hpp:31
Abstract base class for MovingObjects that are represented by a Sprite.
Definition: moving_sprite.hpp:29
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