17 #ifndef HEADER_SUPERTUX_BADGUY_DARTTRAP_HPP 18 #define HEADER_SUPERTUX_BADGUY_DARTTRAP_HPP 20 #include "object/sticky_object.hpp" 33 static std::string class_name() {
return "darttrap"; }
34 virtual std::string get_class_name()
const override {
return class_name(); }
35 static std::string display_name() {
return _(
"Dart Trap"); }
40 virtual GameObjectTypes
get_types()
const override;
41 virtual std::string get_default_sprite_name()
const override;
43 virtual void on_flip(
float height)
override;
44 virtual void on_type_change(
int old_type)
override;
63 float m_initial_delay;
66 std::string m_dart_sprite;
virtual std::vector< Direction > get_allowed_directions() const override
Returns a vector of directions the badguy can be set to.
Definition: darttrap.cpp:189
Badguy "DartTrap" - Shoots a Dart at regular intervals.
Definition: darttrap.hpp:23
virtual void on_flip(float height) override
When level is flipped vertically.
Definition: darttrap.cpp:195
virtual void initialize() override
called immediately before the first call to initialize
Definition: darttrap.cpp:60
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: sticky_object.hpp:84
Definition: object_settings.hpp:39
virtual HitResponse collision_player(Player &player, const CollisionHit &hit) override
Called when the badguy collided with a player.
Definition: darttrap.cpp:72
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: darttrap.hpp:37
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: darttrap.hpp:36
virtual GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: darttrap.cpp:167
virtual void active_update(float dt_sec) override
called each frame when the badguy is activated.
Definition: darttrap.cpp:78
This is a class for BadGuys that can stick to the sides, top and bottom of MovingObjects, such as platforms, fallblock, tilemap, etc.
Definition: sticky_object.hpp:77
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
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
Definition: reader_mapping.hpp:32
This module contains methods controlling the player.
Definition: player.hpp:47
virtual void activate() override
called when the badguy has been activated.
Definition: darttrap.cpp:66
This class collects data about a collision.
Definition: collision_hit.hpp:44