Time Rewizer  v.1.1
Created by: Mark Oostveen
MarkOostveen.TimeRewizer.PositionRotationRewizer Class Reference

Monobehaviour that can be rewinded with postion, and rotation More...

+ Inheritance diagram for MarkOostveen.TimeRewizer.PositionRotationRewizer:
+ Collaboration diagram for MarkOostveen.TimeRewizer.PositionRotationRewizer:

Classes

struct  Snapshot
 Snapshot data for PositionRotationVelocityRewinding More...
 
struct  SnapshotData
 Snapshot data for PositionRotationVelocityRewinding More...
 

Public Member Functions

ISnapShot Track ()
 Return Current state of the object More...
 
void Rewind (ISnapShot variableStruct)
 Replaces current state of object with state given, Note object type must actually be snapshot value type of current type More...
 
void ForceRewind (ISnapShot variableStruct)
 Forces a value to be used for rewinding next frame More...
 
ScriptableBake LoadScriptableContent ()
 Returns scriptable object Reference More...
 
bool CompatibilityCheck (ScriptableBake scriptableobject, string tag)
 Indicates if scriptable object is compatible with this rewindable type More...
 

Properties

GameObject Linkedobj [get]
 Linked game object to rewindable More...
 
RewizeSystem.ERewindingType RewindType [get, set]
 Type of rewinding treatment More...
 
ScriptableBake PreLoadInfo [set]
 Install Baked rewind info More...
 
bool Rewinding [get, set]
 Rewinding ON/OFF More...
 
bool Paused [get, set]
 Paused ON/OFF More...
 

Events

Action< SnapshotOnTracked
 Invokes on being tracked More...
 

Detailed Description

Monobehaviour that can be rewinded with postion, and rotation

Member Function Documentation

◆ CompatibilityCheck()

bool MarkOostveen.TimeRewizer.PositionRotationRewizer.CompatibilityCheck ( ScriptableBake  scriptableobject,
string  tag 
)

Indicates if scriptable object is compatible with this rewindable type

Parameters
scriptableobject
tag
Returns

Implements MarkOostveen.TimeRewizer.IRewizeable.

61  {
62  if (tag != "P_R") return false;
63 
64  if (m_PreLoadInfo != null)
65  return scriptableobject.GetContents(tag).Length > 0;
66 
67  return true;
68  }
+ Here is the call graph for this function:

◆ ForceRewind()

void MarkOostveen.TimeRewizer.PositionRotationRewizer.ForceRewind ( ISnapShot  variableStruct)

Forces a value to be used for rewinding next frame

Parameters
variableStruct

Implements MarkOostveen.TimeRewizer.IRewizeable.

40  {
41  m_SnapshotValue = (Snapshot)variableStruct;
42  m_ForceRewind = true;
43  }

◆ LoadScriptableContent()

ScriptableBake MarkOostveen.TimeRewizer.PositionRotationRewizer.LoadScriptableContent ( )

Returns scriptable object Reference

Returns

Implements MarkOostveen.TimeRewizer.IRewizeable.

50  {
51  return m_PreLoadInfo;
52  }
+ Here is the caller graph for this function:

◆ Rewind()

void MarkOostveen.TimeRewizer.PositionRotationRewizer.Rewind ( ISnapShot  variableStruct)

Replaces current state of object with state given, Note object type must actually be snapshot value type of current type

Parameters
variableStruct

Implements MarkOostveen.TimeRewizer.IRewizeable.

31  {
32  m_SnapshotValue = (Snapshot)variableStruct;
33  }

◆ Track()

ISnapShot MarkOostveen.TimeRewizer.PositionRotationRewizer.Track ( )

Return Current state of the object

Returns

Implements MarkOostveen.TimeRewizer.IRewizeable.

20  {
21  OnTracked?.Invoke(m_SnapshotValue);
22  return m_SnapshotValue;
23  }

Property Documentation

◆ Linkedobj

GameObject MarkOostveen.TimeRewizer.PositionRotationRewizer.Linkedobj
get

Linked game object to rewindable

31 { get; private set; }

◆ Paused

bool MarkOostveen.TimeRewizer.PositionRotationRewizer.Paused
getset

Paused ON/OFF

54 { get; set; }

◆ PreLoadInfo

ScriptableBake MarkOostveen.TimeRewizer.PositionRotationRewizer.PreLoadInfo
set

Install Baked rewind info

42  {
43  set => m_PreLoadInfo = value;
44  }

◆ Rewinding

bool MarkOostveen.TimeRewizer.PositionRotationRewizer.Rewinding
getset

Rewinding ON/OFF

49 { get; set; }

◆ RewindType

RewizeSystem.ERewindingType MarkOostveen.TimeRewizer.PositionRotationRewizer.RewindType
getset

Type of rewinding treatment

36 { get; set; }

Event Documentation

◆ OnTracked

Action<Snapshot> MarkOostveen.TimeRewizer.PositionRotationRewizer.OnTracked

Invokes on being tracked