Advertisement
zCool

Character.h

May 20th, 2012
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #ifndef CHARACTER_H
  2. #define CHARACTER_H
  3.  
  4. #include "Entity.h"
  5. #include <string>
  6.  
  7. class Character:public Entity
  8. {
  9. public:
  10.     enum directions
  11.     {
  12.       EAST,
  13.       WEST,
  14.       NORTH,
  15.       SOUTH
  16.     };
  17.     Character(int X, int Y, std::string sprite, int score);
  18.     int getScore() { return m_score; }
  19.     void move(Character::directions direction);
  20.     void undoMove(Character::directions direction);
  21.     void setX(int X) { m_X = X; }
  22.     void setY(int Y) { m_Y = Y; }
  23.     void increaseScore() { m_score++; }
  24.    
  25.  
  26. protected:
  27.     int m_score;
  28. };
  29.  
  30. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement