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

Property rewinder for audio rewinding More...

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

Classes

struct  AudioValue
 SnapshotData More...
 
struct  Snapshot
 Struct containing snapshot for audiorewinding More...
 

Public Member Functions

void Initialize (AudioSource source, AudioSource distortionSource, GameObject gameobject)
 Initialize AudioRewizer object More...
 
override void Rewind (ISnapShot variableStruct)
 Replace snapshot with given snapshot More...
 
override void ForceRewind (ISnapShot variableStruct)
 Forces a value to be used for rewinding next frame More...
 
override ISnapShot Track ()
 Get current Snapshot More...
 

Package Functions

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

Detailed Description

Property rewinder for audio rewinding

Member Function Documentation

◆ ForceRewind()

override void MarkOostveen.TimeRewizer.AudioRewizer.ForceRewind ( ISnapShot  variableStruct)

Forces a value to be used for rewinding next frame

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

◆ Initialize()

void MarkOostveen.TimeRewizer.AudioRewizer.Initialize ( AudioSource  source,
AudioSource  distortionSource,
GameObject  gameobject 
)

Initialize AudioRewizer object

Parameters
source
distortionSource
gameobject
19  {
20  Initialize(gameobject);
21  m_Value = source;
22  m_DistortionSource = distortionSource;
23  }

◆ OnFixedUpdateBaked()

override void MarkOostveen.TimeRewizer.AudioRewizer.OnFixedUpdateBaked ( )
package

Baked Update

24  {
25  if (Rewinding || Paused || m_ForceRewind)
26  {
27  UseSnapshot();
28  }
29  }

◆ OnFixedUpdateNormal()

override void MarkOostveen.TimeRewizer.AudioRewizer.OnFixedUpdateNormal ( )
package

Normal Update

9  {
10  if (Rewinding || Paused)
11  {
12  UseSnapshot();
13  }
14  else
15  {
16  CreateSnapshot();
17  }
18  }

◆ Rewind()

override void MarkOostveen.TimeRewizer.AudioRewizer.Rewind ( ISnapShot  variableStruct)

Replace snapshot with given snapshot

Parameters
variableStruct
30  {
31  m_SnapshotValue = (Snapshot)variableStruct;
32  }

◆ Track()

override ISnapShot MarkOostveen.TimeRewizer.AudioRewizer.Track ( )

Get current Snapshot

Returns
49  {
50  return m_SnapshotValue;
51  }