17 #ifndef HEADER_SUPERTUX_OBJECT_INVISIBLE_BLOCK_HPP 18 #define HEADER_SUPERTUX_OBJECT_INVISIBLE_BLOCK_HPP 20 #include "object/block.hpp" 28 static std::string class_name() {
return "invisible_block"; }
29 virtual std::string get_class_name()
const override {
return class_name(); }
30 static std::string display_name() {
return _(
"Invisible Block"); }
38 GameObjectTypes
get_types()
const override;
39 std::string get_default_sprite_name()
const override;
42 virtual void hit(
Player& player)
override;
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: invisible_block.hpp:31
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: invisible_block.hpp:32
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: invisible_block.cpp:79
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: invisible_block.cpp:55
GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: invisible_block.cpp:34
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
Definition: invisible_block.hpp:22
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 GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: block.hpp:33
Definition: reader_mapping.hpp:32
This module contains methods controlling the player.
Definition: player.hpp:47
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
virtual bool collides(GameObject &other, const CollisionHit &hit) const override
when 2 objects collided, we will first call the collision functions of both objects that can decide o...
Definition: invisible_block.cpp:62
This class collects data about a collision.
Definition: collision_hit.hpp:44