18 #ifndef HEADER_SUPERTUX_BADGUY_FISH_SWIMMING_HPP 19 #define HEADER_SUPERTUX_BADGUY_FISH_SWIMMING_HPP 21 #include "badguy/badguy.hpp" 32 virtual void update(
float dt_sec)
override;
35 virtual void freeze()
override;
36 virtual void unfreeze(
bool melt =
true)
override;
37 virtual bool is_freezable()
const override;
38 static std::string class_name() {
return "fish-swimming"; }
39 virtual std::string get_class_name()
const override {
return class_name(); }
40 static std::string display_name() {
return _(
"Swimming Fish"); }
42 virtual std::string get_overlay_size()
const override {
return "2x1"; }
46 virtual GameObjectTypes
get_types()
const override;
47 virtual std::string get_default_sprite_name()
const override;
50 void maintain_velocity(
float goal_x_velocity);
65 Timer m_beached_timer;
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: fish_swimming.hpp:41
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: badguy.hpp:71
virtual void update(float dt_sec) override
Called each frame.
Definition: fish_swimming.cpp:136
Definition: object_settings.hpp:39
virtual void freeze() override
Called when hit by an ice bullet, and is_freezable() returns true.
Definition: fish_swimming.cpp:213
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: fish_swimming.hpp:43
virtual void active_update(float dt_sec) override
called each frame when the badguy is activated.
Definition: fish_swimming.cpp:150
virtual HitResponse collision_badguy(BadGuy &badguy, const CollisionHit &hit) override
Called when the badguy collided with another badguy.
Definition: fish_swimming.cpp:122
virtual void initialize() override
called immediately before the first call to initialize
Definition: fish_swimming.cpp:89
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
Definition: fish_swimming.hpp:23
virtual GameObjectTypes get_types() const override
Get all types of the object, if available.
Definition: fish_swimming.cpp:53
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
virtual void unfreeze(bool melt=true) override
Called to unfreeze the badguy.
Definition: fish_swimming.cpp:221
Definition: reader_mapping.hpp:32
virtual void collision_solid(const CollisionHit &hit) override
Called when the badguy collided with solid ground.
Definition: fish_swimming.cpp:97
This class collects data about a collision.
Definition: collision_hit.hpp:44