Finality Engine
Loading...
Searching...
No Matches
HistoryCheckpoint.h
Go to the documentation of this file.
1
6#pragma once
7
8namespace FINALITY
9{
12 {
13 bool m_Requested = true;
14 bool m_Interacting = false;
15 public:
16 void Request() { m_Requested = true; }
17 void Completed() { m_Requested = false; }
18 bool Update(bool interacting, bool actionCompleted = false)
19 {
20 m_Requested |= actionCompleted;
21 if (interacting) { m_Interacting = true; return false; }
22 const bool checkpoint = m_Requested || m_Interacting;
23 m_Requested = m_Interacting = false;
24 return checkpoint;
25 }
26 };
27}
bool Update(bool interacting, bool actionCompleted=false)