17 #ifndef HEADER_SUPERTUX_TRIGGER_DOOR_HPP 18 #define HEADER_SUPERTUX_TRIGGER_DOOR_HPP 20 #include "supertux/timer.hpp" 21 #include "trigger/trigger_base.hpp" 30 Door(
int x,
int y,
const std::string& sector,
const std::string& spawnpoint);
33 virtual std::string get_class()
const override {
return "door"; }
34 virtual std::string get_display_name()
const override {
return _(
"Door"); }
38 virtual void update(
float dt_sec)
override;
53 std::string target_sector;
54 std::string target_spawnpoint;
57 Timer stay_open_timer;
61 Door& operator=(
const Door&) =
delete;
EventType
Definition: trigger_base.hpp:35
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: door.cpp:118
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: door.cpp:87
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: door.cpp:146
Definition: object_settings.hpp:35
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
virtual void event(Player &player, EventType type) override
Receive trigger events.
Definition: door.cpp:124
This class is the base class for all objects you can interact with in some way.
Definition: trigger_base.hpp:31
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
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