Intelligent robot movement.
[sdlbotor.git] / Player.h
blob89ab93d8671561878f84a50760985fa21440862a
1 #ifndef PLAYER_H
2 #define PLAYER_H
4 #include "LivingMapObject.h"
6 namespace botor
9 class Player : public LivingMapObject
12 private:
14 unsigned int lives;
17 protected:
20 bool immune;
22 public:
24 static const float PLAYER_SPEED = 0.1f;
26 public:
28 Player( Uint8 X = 0, Uint8 Y = 0 );
30 private:
32 void InitWalking( Uint8 X, Uint8 Y );
34 protected:
36 float SPEED();
38 bool isWalkable( Uint8 X, Uint8 Y );
40 public:
42 void HandleInput( SDL_Event *event );
44 void OnTile( Tile *t );
45 void OnDead();
47 void ResetPlayer();
49 unsigned int getLives();
56 #endif