17 #ifndef HEADER_SUPERTUX_BADGUY_WALKING_BADGUY_HPP 18 #define HEADER_SUPERTUX_BADGUY_WALKING_BADGUY_HPP 20 #include "badguy/badguy.hpp" 29 const std::string& sprite_name,
30 const std::string& walk_left_action,
31 const std::string& walk_right_action,
32 int layer = LAYER_OBJECTS,
33 const std::string& light_sprite_name =
"images/objects/lightmap_light/lightmap_light-medium.sprite");
35 const std::string& sprite_name,
36 const std::string& walk_left_action,
37 const std::string& walk_right_action,
38 int layer = LAYER_OBJECTS,
39 const std::string& light_sprite_name =
"images/objects/lightmap_light/lightmap_light-medium.sprite");
41 const std::string& sprite_name,
42 const std::string& walk_left_action,
43 const std::string& walk_right_action,
44 int layer = LAYER_OBJECTS,
45 const std::string& light_sprite_name =
"images/objects/lightmap_light/lightmap_light-medium.sprite");
51 virtual void freeze()
override;
56 float get_velocity_y()
const;
57 void set_velocity_y(
float vy);
62 float get_walk_speed()
const {
return walk_speed; }
63 void set_walk_speed (
float);
70 std::string walk_left_action;
71 std::string walk_right_action;
74 Timer turn_around_timer;
int turn_around_counter
counts number of turns since turn_around_timer was started
Definition: walking_badguy.hpp:75
Base class for moving sprites that can hurt the Player.
Definition: badguy.hpp:31
virtual void unfreeze() override
Called to unfreeze the badguy.
Definition: walking_badguy.cpp:223
virtual void collision_solid(const CollisionHit &hit) override
Called when the badguy collided with solid ground.
Definition: walking_badguy.cpp:161
Simple two dimensional vector.
Definition: vector.hpp:24
bool is_active() const
Returns true if we were in STATE_ACTIVE at the beginning of the last call to update() ...
Definition: badguy.cpp:687
virtual void active_update(float dt_sec) override
called each frame when the badguy is activated.
Definition: walking_badguy.cpp:155
virtual HitResponse collision_badguy(BadGuy &badguy, const CollisionHit &hit) override
Called when the badguy collided with another badguy.
Definition: walking_badguy.cpp:180
Base class for Badguys that walk on the floor.
Definition: walking_badguy.hpp:25
virtual void freeze() override
Called when hit by an ice bullet, and is_freezable() returns true.
Definition: walking_badguy.cpp:216
void add_velocity(const Vector &velocity)
Adds velocity to the badguy (be careful when using this)
Definition: walking_badguy.cpp:91
virtual void initialize() override
called immediately before the first call to initialize
Definition: walking_badguy.cpp:73
Simple timer designed to be used in the update functions of objects.
Definition: timer.hpp:24
Definition: reader_mapping.hpp:31
int max_drop_height
Maximum height of drop before we will turn around, or -1 to just drop from any ledge.
Definition: walking_badguy.hpp:73
This class collects data about a collision.
Definition: collision_hit.hpp:44