// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include <math.h>
+
#include "badguy/walking_badguy.hpp"
#include "sprite/sprite.hpp"
}
void
+WalkingBadguy::set_walk_speed (float ws)
+{
+ walk_speed = fabs (ws);
+ physic.set_velocity_x(dir == LEFT ? -walk_speed : walk_speed);
+}
+
+void
WalkingBadguy::active_update(float elapsed_time)
{
BadGuy::active_update(elapsed_time);
float get_velocity_y() const;
void set_velocity_y(float vy);
+ float get_walk_speed (void) const
+ {
+ return (walk_speed);
+ }
+ void set_walk_speed (float);
+
protected:
void turn_around();