// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
-
#ifndef __BADGUY_H__
#define __BADGUY_H__
#include "timer.h"
#include "moving_object.h"
#include "sprite/sprite.h"
-#include "math/physic.h"
+#include "physic.h"
#include "object/player.h"
#include "serializable.h"
#include "resources.h"
#include "video/drawing_context.h"
#include "sprite/sprite_manager.h"
-using namespace SuperTux;
-
class BadGuy : public MovingObject, public Serializable
{
public:
*/
virtual void draw(DrawingContext& context);
/** Called each frame. The default implementation checks badguy state and
- * calls active_action and inactive_action
+ * calls active_update and inactive_update
*/
- virtual void action(float elapsed_time);
+ virtual void update(float elapsed_time);
/** Called when a collision with another object occured. The default
* implemetnation calls collision_player, collision_solid, collision_badguy
* and collision_squished
{
start_position = vec;
}
+
+ /** Count this badguy to the statistics? This value should not be changed
+ * during runtime. */
+ bool countMe;
protected:
enum State {
virtual bool collision_squished(Player& player);
/** called each frame when the badguy is activated. */
- virtual void active_action(float elapsed_time);
+ virtual void active_update(float elapsed_time);
/** called each frame when the badguy is not activated. */
- virtual void inactive_action(float elapsed_time);
+ virtual void inactive_update(float elapsed_time);
/**
* called when the badguy has been activated. (As a side effect the dir
Vector start_position;
Direction dir;
-
- int hitpoints;
- int bullet_hitpoints;
private:
void try_activate();
State state;
- Timer2 state_timer;
+ Timer state_timer;
};
#endif