17 #ifndef HEADER_SUPERTUX_TRIGGER_TRIGGER_BASE_HPP 18 #define HEADER_SUPERTUX_TRIGGER_TRIGGER_BASE_HPP 20 #include "object/sticky_object.hpp" 21 #include "supertux/moving_object.hpp" 22 #include "supertux/object_remove_listener.hpp" 55 std::vector<Player*> m_hit;
58 std::vector<Player*> m_losetouch_listeners;
75 TriggerBase::update();
79 return TriggerBase::collision(other, hit);
82 int get_layer()
const override {
return LAYER_TILES + 1; }
99 TriggerBase::update();
103 return TriggerBase::collision(other, hit);
119 virtual void update(
float dt_sec)
override 122 TriggerBase::update();
126 return TriggerBase::collision(other, hit);
virtual void update(float) override
This function is called once per frame and allows the object to update it's state.
Definition: trigger_base.hpp:73
Object came into contact.
Definition: trigger_base.hpp:35
virtual void update(float) override
This function is called once per frame and allows the object to update it's state.
Definition: trigger_base.hpp:97
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: trigger_base.hpp:101
EventType
Definition: trigger_base.hpp:34
Definition: object_remove_listener.hpp:22
Definition: trigger_base.hpp:90
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: trigger_base.hpp:77
virtual void object_removed(GameObject *object) override
Called by GameObject destructor of an object in losetouch_listeners.
Definition: trigger_base.cpp:71
Definition: collision.cpp:24
Action button pressed.
Definition: trigger_base.hpp:37
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: trigger_base.hpp:71
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: trigger_base.hpp:119
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: trigger_base.hpp:124
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: trigger_base.hpp:95
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: moving_sprite.hpp:60
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: sticky_object.cpp:44
Lost contact with object.
Definition: trigger_base.hpp:36
virtual void event(Player &player, EventType type)=0
Receive trigger events.
Base class for all dynamic/moving game objects.
Definition: moving_object.hpp:35
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: sticky_object.hpp:34
This class is the base class for all objects you can interact with in some way.
Definition: trigger_base.hpp:31
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: moving_object.hpp:49
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: trigger_base.hpp:117
Definition: trigger_base.hpp:112
Definition: trigger_base.hpp:66
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
Abstract base class for ""MovingObject""s, that are represented by a sprite.
Definition: moving_sprite.hpp:33
This module contains methods controlling the player.
Definition: player.hpp:47
This class collects data about a collision.
Definition: collision_hit.hpp:44