Advertisement
Guest User

Untitled

a guest
Mar 25th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. #ifndef Tank_H
  2. #define Tank_H
  3. #pragma warning (disable:4786)
  4.  
  5. #include <windows.h>
  6. #include <vector>
  7.  
  8. #include "Vector2D.h"
  9. #include "Bullet.h"
  10.  
  11. class Tank {
  12.  
  13. private:
  14.  
  15.     //the position of the tank
  16.     Vector2D tank_pos;
  17.  
  18.     Vector2D turret_pos;
  19.  
  20.     //the speed
  21.     Vector2D tank_speed;
  22.    
  23.     std::vector<Bullet> bullets;
  24.  
  25.     int bulletCount;
  26.  
  27.     int noBullets;
  28.  
  29. public:
  30.  
  31.     //Constructor
  32.     Tank(Vector2D pos, Vector2D speed);
  33.  
  34.     //Destructor
  35.     ~Tank();
  36.  
  37.     //Local Render method for tank only
  38.     void Render();
  39.  
  40.     void Update(double elapsedTime);
  41.  
  42.     void SetSpeed(Vector2D speed);
  43.  
  44.     Vector2D GetSpeed();
  45.  
  46.     Vector2D GetPos();
  47.  
  48.     std::vector<Bullet> GetBullets();
  49.  
  50.     //Return bullet objects
  51.     void Fire();
  52.  
  53.     void ResetBullet(int i);
  54.  
  55. };
  56.  
  57. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement