Player.h 861 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #pragma once
  2. #include "Vector.h"
  3. #include "Weapon.h"
  4. #include "json.h"
  5. #include <vector>
  6. class Player
  7. {
  8. private:
  9. static Player* instance;
  10. void levelUp();
  11. std::vector<Weapon*> leftweapons;
  12. std::vector<Weapon*> rightweapons;
  13. void loadWeapons(void);
  14. int currentrightweapon;
  15. int currentleftweapon;
  16. public:
  17. Player();
  18. ~Player();
  19. void setCamera();
  20. void setPosition(float angle, float fac, bool height);
  21. void draw(void);
  22. static Player* getInstance(void);
  23. static void init(void);
  24. Vec3f position;
  25. Vec2f rotation;
  26. Weapon* leftWeapon;
  27. Weapon* rightWeapon;
  28. float health, maxHp;
  29. float xp, maxXp;
  30. int level;
  31. int crystals;
  32. bool hit;
  33. bool isHit;
  34. float speed;
  35. void HpUp(int);
  36. void HpDown(int);
  37. void XpUp(int);
  38. void PreviousRightWeapon(void);
  39. void NextRightWeapon(void);
  40. void PreviousLeftWeapon(void);
  41. void NextLeftWeapon(void);
  42. };