17 #ifndef HEADER_SUPERTUX_BADGUY_STALACTITE_HPP 18 #define HEADER_SUPERTUX_BADGUY_STALACTITE_HPP 20 #include "object/sticky_object.hpp" 33 virtual GameObjectTypes
get_types()
const override;
34 std::string get_default_sprite_name()
const override;
40 static std::string class_name() {
return "stalactite"; }
41 virtual std::string get_class_name()
const override {
return class_name(); }
42 static std::string display_name() {
return _(
"Stalactite"); }
48 virtual void on_flip(
float height)
override;
60 enum StalactiteState {
69 StalactiteState state;
virtual void kill_fall() override
Set the badguy to kill/falling state, which makes him falling of the screen (his sprite is turned ups...
Definition: stalactite.cpp:180
virtual void draw(DrawingContext &context) override
Called when the badguy is drawn.
Definition: stalactite.cpp:185
Base class for moving sprites that can hurt the Player.
Definition: badguy.hpp:38
virtual GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: stalactite.cpp:159
Definition: bullet.hpp:29
virtual HitResponse collision_badguy(BadGuy &other, const CollisionHit &hit) override
Called when the badguy collided with another badguy.
Definition: stalactite.cpp:120
virtual void active_update(float dt_sec) override
called each frame when the badguy is activated.
Definition: stalactite.cpp:54
virtual void collision_solid(const CollisionHit &hit) override
Called when the badguy collided with solid ground.
Definition: stalactite.cpp:99
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: sticky_object.hpp:84
virtual HitResponse collision_player(Player &player, const CollisionHit &hit) override
Called when the badguy collided with a player.
Definition: stalactite.cpp:110
Definition: object_settings.hpp:39
Definition: stalactite.hpp:22
virtual HitResponse collision_bullet(Bullet &bullet, const CollisionHit &hit) override
Called when the badguy collided with a bullet.
Definition: stalactite.cpp:139
virtual void on_flip(float height) override
When level is flipped vertically.
Definition: stalactite.cpp:218
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: stalactite.hpp:44
std::vector< Direction > get_allowed_directions() const override
Returns a vector of directions the badguy can be set to.
Definition: stalactite.cpp:212
virtual void deactivate() override
called when the badguy has been deactivated
Definition: stalactite.cpp:205
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
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: stalactite.hpp:43
Definition: reader_mapping.hpp:32
This module contains methods controlling the player.
Definition: player.hpp:47
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