18 #ifndef HEADER_SUPERTUX_BADGUY_IGEL_HPP 19 #define HEADER_SUPERTUX_BADGUY_IGEL_HPP 21 #include "badguy/walking_badguy.hpp" 23 #include "supertux/timer.hpp" 36 virtual std::string get_overlay_size()
const override {
return "2x1"; }
37 static std::string class_name() {
return "igel"; }
38 virtual std::string get_class_name()
const override {
return class_name(); }
39 static std::string display_name() {
return _(
"Igel"); }
43 virtual bool is_freezable()
const override {
return true; }
44 virtual void unfreeze(
bool melt =
true)
override;
46 virtual GameObjectTypes
get_types()
const override;
47 virtual std::string get_default_sprite_name()
const override;
50 enum Type { NORMAL, CORRUPTED };
51 enum State { STATE_NORMAL, STATE_CHARGING, STATE_ROLLING };
53 bool should_roll()
const;
56 void stop_rolling(
bool bonk =
false);
57 float get_normal_walk_speed()
const;
62 Timer m_roll_cooldown;
68 Igel& operator=(
const Igel&) =
delete;
virtual bool can_break() const override
True if this badguy can break bricks or open bonusblocks in his current form.
Definition: igel.cpp:151
Base class for moving sprites that can hurt the Player.
Definition: badguy.hpp:38
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: igel.hpp:40
virtual HitResponse collision_badguy(BadGuy &badguy, const CollisionHit &hit) override
Called when the badguy collided with another badguy.
Definition: igel.cpp:139
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: walking_badguy.hpp:55
virtual void collision_solid(const CollisionHit &hit) override
Called when the badguy collided with solid ground.
Definition: igel.cpp:125
Base class for Badguys that walk on the floor.
Definition: walking_badguy.hpp:25
virtual void active_update(float dt_sec) override
called each frame when the badguy is activated.
Definition: igel.cpp:61
virtual void run_dead_script() override
Call this, if you use custom kill_fall() or kill_squashed(GameObject& object)
Definition: igel.cpp:157
virtual void unfreeze(bool melt=true) override
Called to unfreeze the badguy.
Definition: igel.cpp:171
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
virtual GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: igel.cpp:191
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: igel.hpp:41
This class collects data about a collision.
Definition: collision_hit.hpp:44