AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
source
io-management
playerController.h
1
#pragma once
2
#include <glm/glm.hpp>
3
#include "../rendering/camera.h"
4
#include "../rendering/window.h"
5
#include "../utils/rigidbody.h"
6
#include "../utils/config.h"
7
8
namespace
Aire {
12
class
PlayerController
{
13
public
:
19
PlayerController
(
Rigidbody
* rigidbody,
Camera
* cam,
Window
* aWindow,
Config
* config);
20
22
PlayerController
() =
default
;
23
26
void
update
(
bool
aDebug);
27
28
private
:
29
Window
* window;
30
Rigidbody
* rb;
31
Camera
* camera;
32
Config
* playerConfig;
33
34
float
playerSpeed, lookSensitivity, horizontalAngle = 0, verticalAngle = 0, lookDownMax, lookUpMax;
35
double
mouseX, mouseY;
36
int
width, height;
37
39
void
loadKeyBinds();
40
41
int
forwardKey;
42
int
backwardKey;
43
int
rightKey;
44
int
leftKey;
45
int
jumpKey;
46
47
// Debug mode
48
bool
debug =
false
;
49
bool
fast =
false
;
50
bool
slow =
false
;
51
float
fastMultiplier = 5.0f;
52
float
slowMultiplier = 0.05f;
53
};
54
}
Aire::Camera
Definition
camera.h:9
Aire::Config
Definition
config.h:11
Aire::PlayerController
Definition
playerController.h:12
Aire::PlayerController::update
void update(bool aDebug)
Definition
playerController.cpp:39
Aire::PlayerController::PlayerController
PlayerController()=default
Default PlayerController constructor.
Aire::Rigidbody
Definition
rigidbody.h:8
Aire::Window
Definition
window.h:13
Generated by
1.10.0