17 #ifndef HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP 18 #define HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP 20 #include "badguy/badguy.hpp" 31 virtual bool is_freezable()
const override {
return false; }
41 virtual std::string get_class()
const override {
return "ghosttree"; }
42 virtual std::string get_display_name()
const override {
return _(
"Ghost tree"); }
49 STATE_IDLE, STATE_SUCKING, STATE_SWALLOWING, STATE_DYING
53 bool is_color_deadly(
Color color)
const;
58 Timer willowisp_timer;
64 SpritePtr glow_sprite;
65 Timer colorchange_timer;
69 Color suck_lantern_color;
73 std::vector<TreeWillOWisp*> willowisps;
Base class for moving sprites that can hurt the Player.
Definition: badguy.hpp:31
virtual bool collides(GameObject &other, const CollisionHit &hit) const override
when 2 objects collided, we will first call the pre_collision_check functions of both objects that ca...
Definition: ghosttree.cpp:229
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
Called when a collision with another object occurred.
Definition: ghosttree.cpp:238
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: ghosttree.hpp:32
Definition: treewillowisp.hpp:25
Definition: ghosttree.hpp:25
Lantern.
Definition: lantern.hpp:23
virtual void active_update(float dt_sec) override
called each frame when the badguy is activated.
Definition: ghosttree.cpp:82
virtual void draw(DrawingContext &context) override
Called when the badguy is drawn.
Definition: ghosttree.cpp:214
virtual void activate() override
called when the badguy has been activated.
Definition: ghosttree.cpp:74
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
virtual bool is_flammable() const override
Returns whether to call ignite() when a badguy gets hit by a fire bullet.
Definition: ghosttree.hpp:30
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
Definition: reader_mapping.hpp:31
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