HALLELUJAH!!
This commit is contained in:
		| @@ -2,6 +2,7 @@ | ||||
| #define _PLAYER_H__ | ||||
| #include "vector3.h" | ||||
| #include "transformation.h" | ||||
| #include "world.h" | ||||
| #include <cmath> | ||||
|  | ||||
| class Player { | ||||
| @@ -9,21 +10,28 @@ public: | ||||
| 	Player(const Vector3f& position, float rotX = 0, float rotY = 0); | ||||
| 	void TurnLeftRight(float value); | ||||
| 	void TurnTopBottom(float value); | ||||
| 	void Move(bool front, bool back, bool left, bool right, bool jump, bool dash, float elapsedTime); | ||||
| 	Vector3f GetInput(bool front, bool back, bool left, bool right, bool jump, bool dash, float elapsedTime); | ||||
| 	void ApplyPhysics(Vector3f input, World world, float elapsedTime); | ||||
| 	void ApplyTransformation(Transformation& transformation, bool rel = true) const; | ||||
|  | ||||
| 	Vector3f GetPosition() const; | ||||
| 	Vector3f GetDirection() const; | ||||
| 	Vector3f GetVelocity() const; | ||||
| 	Vector3f GetPOV() const; | ||||
|  | ||||
| private: | ||||
| 	Vector3f m_position; | ||||
| 	Vector3f m_POV; | ||||
| 	Vector3f m_velocity; | ||||
| 	Vector3f m_direction; | ||||
|  | ||||
| 	float m_rotX = 0;  | ||||
| 	float m_rotY = 0; | ||||
| 	float m_topspeed = 40; | ||||
| 	float m_jumpforce = .9f; | ||||
| 	float m_topspeed = 20; | ||||
| 	float m_jumpforce = 0.3f; | ||||
|  | ||||
| 	bool m_airborne; | ||||
| 	int m_dbljump; // Peut sauter ou dasher tant que la variable est en dessous de 2. | ||||
| }; | ||||
| #endif //_PLAYER_H__ | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user