demo memory leak fix

This commit is contained in:
h4570
2022-07-31 11:52:49 +02:00
parent 347fdb240b
commit 834d57ea32
10 changed files with 242 additions and 62 deletions
+40
View File
@@ -0,0 +1,40 @@
/*
# ______ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#pragma once
#include "state/state.hpp"
#include "state/global_state_type.hpp"
namespace Demo {
class GameState : public State<GlobalStateType> {
public:
GameState(Engine* t_engine);
~GameState();
const GlobalStateType& getState() const { return state; }
const bool& wantFinish() const { return _wantFinish; };
void onStart();
void update();
/** @return Next game state */
GlobalStateType onFinish();
private:
GlobalStateType state;
bool _wantFinish;
bool initialized;
};
} // namespace Demo