17 #ifndef HEADER_SUPERTUX_OBJECT_BLOCK_HPP 18 #define HEADER_SUPERTUX_OBJECT_BLOCK_HPP 20 #include "sprite/sprite.hpp" 21 #include "sprite/sprite_ptr.hpp" 22 #include "supertux/moving_object.hpp" 32 Block(SpritePtr sprite);
36 virtual void update(
float dt_sec)
override;
39 virtual std::string get_default_sprite_name()
const {
return m_default_sprite_name; }
42 virtual void after_editor_set()
override;
45 virtual void hit(
Player& player) = 0;
53 std::string m_sprite_name;
54 std::string m_default_sprite_name;
58 float m_bounce_offset;
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: block.cpp:130
Definition: object_settings.hpp:35
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: block.cpp:85
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: block.cpp:153
Base class for all dynamic/moving game objects.
Definition: moving_object.hpp:31
Definition: reader_mapping.hpp:31
Definition: player.hpp:39
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