-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseState.hpp
30 lines (25 loc) · 903 Bytes
/
BaseState.hpp
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
#pragma once
#include <SFML/Graphics.hpp>
class StateManager;
class BaseState{
friend class StateManager;
public:
BaseState(StateManager* l_stateManager):m_stateMgr(l_stateManager),
m_transparent(false), m_transcendent(false){}
virtual ~BaseState(){}
virtual void OnCreate() = 0;
virtual void OnDestroy() = 0;
virtual void Activate() = 0;
virtual void Deactivate() = 0;
virtual void Update(const sf::Time& l_time) = 0;
virtual void Draw() = 0;
void SetTransparent(const bool& l_transparent){ m_transparent = l_transparent; }
bool IsTransparent()const{ return m_transparent; }
void SetTranscendent(const bool& l_transcendence){ m_transcendent = l_transcendence; }
bool IsTranscendent()const{ return m_transcendent; }
StateManager* GetStateManager(){ return m_stateMgr; }
protected:
StateManager* m_stateMgr;
bool m_transparent;
bool m_transcendent;
};