Time Rewizer  v.1.1
Created by: Mark Oostveen
MarkOostveen.TimeRewizer.PropertyRewizer< T > Class Template Reference

Rewind all kinds of types with this class, if you want to do something special you need to create your own. this class can be used for general types. More...

+ Inheritance diagram for MarkOostveen.TimeRewizer.PropertyRewizer< T >:
+ Collaboration diagram for MarkOostveen.TimeRewizer.PropertyRewizer< T >:

Public Member Functions

override void ForceRewind (ISnapShot variableStruct)
 Forces a value to be used for rewinding next frame More...
 

Package Functions

override void OnFixedUpdateNormal ()
 Normal Update More...
 
override void OnFixedUpdateBaked ()
 Baked Update More...
 

Detailed Description

Rewind all kinds of types with this class, if you want to do something special you need to create your own. this class can be used for general types.

Template Parameters
T

Member Function Documentation

◆ ForceRewind()

override void MarkOostveen.TimeRewizer.PropertyRewizer< T >.ForceRewind ( ISnapShot  variableStruct)

Forces a value to be used for rewinding next frame

Parameters
variableStruct
45  {
46  m_SnapshotValue = (Snapshot)variableStruct;
47  m_ForceRewind = true;
48  }

◆ OnFixedUpdateBaked()

override void MarkOostveen.TimeRewizer.PropertyRewizer< T >.OnFixedUpdateBaked ( )
package

Baked Update

33  {
34  if (Rewinding || Paused || m_ForceRewind)
35  {
36  m_Value = m_SnapshotValue.GetValue();
37  }
38  }

◆ OnFixedUpdateNormal()

override void MarkOostveen.TimeRewizer.PropertyRewizer< T >.OnFixedUpdateNormal ( )
package

Normal Update

18  {
19  if (Rewinding || Paused)
20  {
21  m_Value = m_SnapshotValue.GetValue();
22  }
23  else
24  {
25  m_SnapshotValue = new Snapshot(m_Value);
26  }
27  }