-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.hh
36 lines (26 loc) · 931 Bytes
/
App.hh
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
#pragma once
#include "Game.hh"
#include "PGEApp.hh"
namespace pge {
class App : public PGEApp
{
public:
/// @brief - Create a new default pixel game engine app.
/// @param desc - contains all the needed information to create the canvas needed
/// by the app and set up base properties.
App(AppDesc &&desc);
~App() override = default;
protected:
bool onFrame(const float elapsedSeconds) override;
void onInputs(const controls::State &controls, CoordinateFrame &frame) override;
void loadResources(const Vec2i &screenDims, Renderer &engine) override;
void cleanResources() override;
void drawDecal(const RenderState &state) override;
void draw(const RenderState &state) override;
void drawUi(const RenderState &state) override;
void drawDebug(const RenderState &state, const Vec2f &mouseScreenPos) override;
private:
Vec2i m_mousePos{};
GameShPtr m_game{nullptr};
};
} // namespace pge