-
Notifications
You must be signed in to change notification settings - Fork 0
/
Player.h
60 lines (48 loc) · 976 Bytes
/
Player.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// River Raid 2018
// Made by Micha³ Berdzik, AGH, 2018 ©
//------------------------------------------------------------------
#pragma once
#include <cmath>
#include <iostream>
#include <SDL.h>
#include <gl/glew.h>
#include <GL/GLU.h>
#include "vector3d.h"
#include "Missiles.h"
#include "Map.h"
#define RUN_SPEED 10
#define TURN_SPEED 10
class Player
{
vector3d loc;
float playPitch, playYaw;
float movevel;
float mousevel;
bool mi = true;
bool ismoved;
int tmpx = 0, tmpy = 0;
float RotYaw;
float RotPitch;
float Health = 10.0;
float Fuel = 10.0;
public:
Player();
~Player();
Missiles bullets;
void RenderPlayer(Map *mapa);
int GetHealth();
int GetFuel();
float GetYaw();
float GetPitch();
float GetSpeed();
vector3d getVector();
vector3d getLocation();
private:
void lockCamera();
void moveCamera(float dir);
void moveCameraUp(float dir);
void LoadPlayer();
void Control();
void UpdateCamera();
void CheckCollision(Map * mapa);
};