1234567891011121314151617181920212223242526272829 |
- #ifndef _player_
- #define _player_
- #include "game_object.hpp"
- #include "rocket.hpp"
- #include "definitions.hpp"
- #include <list>
- class player : public game_object
- {
- public:
- player(); //default constructor: creates a 8-long player in C/2,R
- player(int); //user-defined length constructor
- ~player() {}
-
- void next_pos(int command); //moves player according to command (WASD or arrow keys)
- void shoot(std::list<bullet> &); //adds a new bullet to the list
- void shootrkt(std::list<rocket> &);
- void set_commands(int* _commands);
- int weaponclass;
- int weaponclassrkt;
- int length;
- bool rocketlauncher; //when rocketlauncher is TRUE, player can shoot rockets.
- int commands[4];
- bool godmode;
- };
- #endif
|