17 #ifndef HEADER_SUPERTUX_OBJECT_BRICK_HPP 18 #define HEADER_SUPERTUX_OBJECT_BRICK_HPP 20 #include "object/block.hpp" 27 Brick(
const Vector& pos,
int data,
const std::string& sprite_name);
28 Brick(
const ReaderMapping& mapping,
const std::string& sprite_name =
"images/objects/bonus_block/brick.sprite");
32 static std::string class_name() {
return "brick"; }
33 virtual std::string get_class_name()
const override {
return class_name(); }
34 static std::string display_name() {
return _(
"Brick"); }
38 GameObjectTypes
get_types()
const override;
39 std::string get_default_sprite_name()
const override;
41 void try_break(
Player* player,
bool slider =
false);
42 void break_for_crusher(
Crusher* crusher);
45 virtual void hit(
Player& player)
override;
65 HeavyBrick(
const Vector& pos,
int data,
const std::string& spriteName);
69 static std::string class_name() {
return "heavy-brick"; }
70 virtual std::string get_class_name()
const override {
return class_name(); }
71 static std::string display_name() {
return _(
"Heavy Brick"); }
75 GameObjectTypes
get_types()
const override {
return {}; }
78 virtual void hit(
Player& player)
override;
GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: brick.cpp:56
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: brick.hpp:72
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: brick.hpp:36
Definition: object_settings.hpp:39
This class is the base class for crushers that tux can stand on.
Definition: crusher.hpp:26
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: brick.cpp:86
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: brick.hpp:35
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: brick.hpp:75
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
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: brick.hpp:73
This class collects data about a collision.
Definition: collision_hit.hpp:44