16 #ifndef HEADER_SUPERTUX_OBJECT_BUMPER_HPP 17 #define HEADER_SUPERTUX_OBJECT_BUMPER_HPP 19 #include "object/sticky_object.hpp" 21 #include "supertux/physic.hpp" 33 virtual void update(
float dt_sec)
override;
36 static std::string class_name() {
return "bumper"; }
37 virtual std::string get_class_name()
const override {
return class_name(); }
38 static std::string display_name() {
return _(
"Bumper"); }
42 virtual void after_editor_set()
override;
43 virtual void on_flip(
float height)
override;
53 Vector m_original_pos;
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: bumper.hpp:39
virtual void on_flip(float height) override
When level is flipped vertically.
Definition: bumper.cpp:139
Physics engine.
Definition: physic.hpp:27
Definition: bumper.hpp:26
Definition: object_settings.hpp:39
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: bumper.cpp:63
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: bumper.cpp:97
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: sticky_object.hpp:34
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
Definition: reader_mapping.hpp:32
This is a class for MovingSprites that can stick to the sides, top and bottom of MovingObjects, such as platforms, fallblock, tilemap, etc.
Definition: sticky_object.hpp:27
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: bumper.hpp:40
This class collects data about a collision.
Definition: collision_hit.hpp:44