raylibstarter
0.1.0
pause_scene.cpp
Go to the documentation of this file.
1
#include <string>
2
3
#include <raylib-cpp.hpp>
4
#include <raylib.h>
5
6
#include <
store.h
>
7
8
#include "
scenes.h
"
9
10
using namespace
std::string_literals;
11
12
game::scenes::PauseScene::PauseScene
() {
13
// Your scene initialization code here...
14
}
15
16
game::scenes::PauseScene::~PauseScene
() {
17
// Your scene cleanup code here...
18
}
19
20
void
game::scenes::PauseScene::Update
() {
21
// Your process input and update game scene code here...
22
if
(IsKeyPressed(KEY_ENTER))
23
game::core::Store::stage
->replaceWithExistingScene(
"pause"
s,
"game"
s);
24
}
25
26
void
game::scenes::PauseScene::Draw
() {
27
// Your scene drawing code here...
28
// Note that scene-actors are drawn automatically
29
DrawText(
"Pause - press ENTER to re-enter the game scene"
, 10, 10, 30, LIGHTGRAY);
30
}
game::scenes::PauseScene::Update
void Update() override
The Update() method is used to process input and update the game state. It is called automatically be...
Definition:
pause_scene.cpp:20
game::scenes::PauseScene::PauseScene
PauseScene()
Definition:
pause_scene.cpp:12
game::scenes::PauseScene::~PauseScene
~PauseScene() override
Definition:
pause_scene.cpp:16
game::scenes::PauseScene::Draw
void Draw() override
The Draw() method can be used to output graphics. Note that the elements of the actor map are drawn a...
Definition:
pause_scene.cpp:26
scenes.h
store.h
game::core::Store::stage
static std::unique_ptr< game::core::Stage > stage
The Stage object is responsible for the scene change and for updating and drawing the scene contents.
Definition:
store.h:16
src
scenes
pause_scene.cpp
Generated by
1.9.3