Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef Tank_H
- #define Tank_H
- #pragma warning (disable:4786)
- #include <windows.h>
- #include <vector>
- #include "Vector2D.h"
- #include "Bullet.h"
- class Tank {
- private:
- //the position of the tank
- Vector2D tank_pos;
- Vector2D turret_pos;
- //the speed
- Vector2D tank_speed;
- std::vector<Bullet> bullets;
- int bulletCount;
- int noBullets;
- public:
- //Constructor
- Tank(Vector2D pos, Vector2D speed);
- //Destructor
- ~Tank();
- //Local Render method for tank only
- void Render();
- void Update(double elapsedTime);
- void SetSpeed(Vector2D speed);
- Vector2D GetSpeed();
- Vector2D GetPos();
- std::vector<Bullet> GetBullets();
- //Return bullet objects
- void Fire();
- void ResetBullet(int i);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement