-
Notifications
You must be signed in to change notification settings - Fork 5
/
pause_state.h
62 lines (44 loc) · 1.89 KB
/
pause_state.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
60
61
62
#ifndef PAUSE_STATE_H
#define PAUSE_STATE_H
#include <array>
#include "game.h"
class PauseState : public State
{
public:
PauseState(const std::shared_ptr<FiniteStateMachine>& finiteStateMachine,
const std::shared_ptr<Window>& window,
const std::shared_ptr<Camera>& camera,
const std::shared_ptr<Shader>& gameObject3DShader,
const std::shared_ptr<GameObject3D>& table,
const std::shared_ptr<Paddle>& leftPaddle,
const std::shared_ptr<Paddle>& rightPaddle,
const std::shared_ptr<Ball>& ball,
const std::shared_ptr<GameObject3D>& point);
~PauseState() = default;
PauseState(const PauseState&) = delete;
PauseState& operator=(const PauseState&) = delete;
PauseState(PauseState&&) = delete;
PauseState& operator=(PauseState&&) = delete;
void enter() override;
void processInput(float deltaTime) override;
void update(float deltaTime) override;
void render() override;
void exit() override;
private:
void resetCamera();
void displayScore();
std::shared_ptr<FiniteStateMachine> mFSM;
std::shared_ptr<Window> mWindow;
std::shared_ptr<Camera> mCamera;
std::shared_ptr<Shader> mGameObject3DShader;
std::shared_ptr<GameObject3D> mTable;
std::shared_ptr<Paddle> mLeftPaddle;
std::shared_ptr<Paddle> mRightPaddle;
std::shared_ptr<Ball> mBall;
std::shared_ptr<GameObject3D> mPoint;
unsigned int mPointsScoredByLeftPaddle;
unsigned int mPointsScoredByRightPaddle;
std::array<glm::vec3, 3> mPositionsOfPointsScoredByLeftPaddle;
std::array<glm::vec3, 3> mPositionsOfPointsScoredByRightPaddle;
};
#endif