17 #ifndef HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP 18 #define HEADER_SUPERTUX_BADGUY_GHOSTTREE_HPP 20 #include "badguy/boss.hpp" 39 static std::string class_name() {
return "ghosttree"; }
40 virtual std::string get_class_name()
const override {
return class_name(); }
41 static std::string display_name() {
return _(
"Ghost Tree"); }
45 virtual void on_flip(
float height)
override;
55 STATE_IDLE, STATE_SUCKING, STATE_SWALLOWING, STATE_DYING
59 bool is_color_deadly(
Color color)
const;
64 Timer willowisp_timer;
70 SpritePtr glow_sprite;
71 Timer colorchange_timer;
75 Color suck_lantern_color;
81 std::vector<TreeWillOWisp*> willowisps;
virtual bool collides(GameObject &other, const CollisionHit &hit) const override
when 2 objects collided, we will first call the collision functions of both objects that can decide o...
Definition: ghosttree.cpp:248
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: boss.hpp:33
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
Called when a collision with another object occurred.
Definition: ghosttree.cpp:257
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:30
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:91
virtual void draw(DrawingContext &context) override
Called when the badguy is drawn.
Definition: ghosttree.cpp:233
virtual std::vector< Direction > get_allowed_directions() const override
Returns a vector of directions the badguy can be set to.
Definition: ghosttree.cpp:284
virtual void activate() override
called when the badguy has been activated.
Definition: ghosttree.cpp:83
This class is responsible for: Updating and drawing the object.
Definition: game_object.hpp:83
virtual void on_flip(float height) override
When level is flipped vertically.
Definition: ghosttree.cpp:290
virtual GameObjectClasses get_class_types() const override
List notable classes in inheritance hierarchy of class.
Definition: ghosttree.hpp:43
virtual std::string get_display_name() const override
Returns the display name of the object, translated to the user's locale.
Definition: ghosttree.hpp:42
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
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