18 #ifndef HEADER_SUPERTUX_BADGUY_HAYWIRE_HPP 19 #define HEADER_SUPERTUX_BADGUY_HAYWIRE_HPP 21 #include "badguy/walking_badguy.hpp" 31 virtual void ignite()
override;
36 virtual bool is_freezable()
const override;
37 virtual void freeze()
override;
44 static std::string class_name() {
return "haywire"; }
45 virtual std::string get_class_name()
const override {
return class_name(); }
46 static std::string display_name() {
return _(
"Haywire"); }
51 inline bool is_exploding()
const {
return m_is_exploding; }
58 Direction get_player_direction(
const Player* player)
const;
60 void start_exploding();
61 void stop_exploding();
65 float time_until_explosion;
68 SpritePtr m_exploding_sprite;
72 Direction m_last_player_direction;
74 std::unique_ptr<SoundSource> ticking;
75 std::unique_ptr<SoundSource> grunting;
Base class for moving sprites that can hurt the Player.
Definition: badguy.hpp:38
virtual void draw(DrawingContext &context) override
Called when the badguy is drawn.
Definition: haywire.cpp:229
virtual HitResponse collision_badguy(BadGuy &badguy, const CollisionHit &hit) override
Called when the badguy collided with another badguy.
Definition: haywire.cpp:350
virtual void active_update(float dt_sec) override
called each frame when the badguy is activated.
Definition: haywire.cpp:107
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: haywire.cpp:343
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: haywire.cpp:242
virtual bool is_snipable() const override
Can enemy be sniped by sliding or swimboosting Tux? Returns false if enemy is spiky or too large...
Definition: haywire.hpp:49
Base class for Badguys that walk on the floor.
Definition: walking_badguy.hpp:25
virtual void play_looping_sounds() override
continues all looping sounds
Definition: haywire.cpp:330
virtual void freeze() override
Called when hit by an ice bullet, and is_freezable() returns true.
Definition: haywire.cpp:276
virtual bool collision_squished(GameObject &object) override
Called when the player hit the badguy from above.
Definition: haywire.cpp:67
virtual void stop_looping_sounds() override
stops all looping sounds
Definition: haywire.cpp:320
Definition: haywire.hpp:25
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: haywire.hpp:47
A sound source represents the source of audio output.
Definition: sound_source.hpp:25
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
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: haywire.hpp:48
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
virtual void ignite() override
Kills the badguy by igniting it.
Definition: haywire.cpp:268
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