Player.h 660 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. public:
  15. Player();
  16. ~Player();
  17. void setCamera();
  18. void setPosition(float angle, float fac, bool height);
  19. void draw(void);
  20. static Player* getInstance(void);
  21. static void init(void);
  22. Vec3f position;
  23. Vec2f rotation;
  24. Weapon* leftWeapon;
  25. Weapon* rightWeapon;
  26. float health, maxHp;
  27. float xp, maxXp;
  28. int level;
  29. int crystals;
  30. float speed;
  31. void HpUp(int);
  32. void HpDown(int);
  33. void XpUp(int);
  34. };