Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
State.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Development Kit"
3 // For conditions of distribution and use, see copyright notice in Prerequesites.hpp
4 
5 #pragma once
6 
7 #ifndef NDK_STATE_HPP
8 #define NDK_STATE_HPP
9 
10 #include <NDK/Prerequesites.hpp>
11 
12 namespace Ndk
13 {
14  class StateMachine;
15 
16  class NDK_API State
17  {
18  public:
19  State() = default;
20  virtual ~State();
21 
22  virtual void Enter(StateMachine& fsm) = 0;
23  virtual void Leave(StateMachine& fsm) = 0;
24  virtual bool Update(StateMachine& fsm, float elapsedTime) = 0;
25  };
26 }
27 
28 #endif // NDK_STATE_HPP
TODO: For now is unable to display different color in the history, it needs a RichTextDrawer to do so...
Definition: Algorithm.hpp:12
NDK class that represents a state machine, to represent the multiple states of your program as a stac...
Definition: StateMachine.hpp:17
NDK class that represents a state of your application.
Definition: State.hpp:16