scripts
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
namespace UnityEngine.Timeline
|
||||
{
|
||||
// Token: 0x02000038 RID: 56
|
||||
public class TimeControlPlayable : PlayableBehaviour
|
||||
{
|
||||
// Token: 0x060001E0 RID: 480 RVA: 0x00009CA4 File Offset: 0x00007EA4
|
||||
public static ScriptPlayable<TimeControlPlayable> Create(PlayableGraph graph, ITimeControl timeControl)
|
||||
{
|
||||
ScriptPlayable<TimeControlPlayable> scriptPlayable;
|
||||
if (timeControl == null)
|
||||
{
|
||||
scriptPlayable = ScriptPlayable<TimeControlPlayable>.Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScriptPlayable<TimeControlPlayable> scriptPlayable2 = ScriptPlayable<TimeControlPlayable>.Create(graph, 0);
|
||||
scriptPlayable2.GetBehaviour().Initialize(timeControl);
|
||||
scriptPlayable = scriptPlayable2;
|
||||
}
|
||||
return scriptPlayable;
|
||||
}
|
||||
|
||||
// Token: 0x060001E1 RID: 481 RVA: 0x00009CE0 File Offset: 0x00007EE0
|
||||
public void Initialize(ITimeControl timeControl)
|
||||
{
|
||||
this.m_timeControl = timeControl;
|
||||
}
|
||||
|
||||
// Token: 0x060001E2 RID: 482 RVA: 0x00009CEA File Offset: 0x00007EEA
|
||||
public override void PrepareFrame(Playable playable, FrameData info)
|
||||
{
|
||||
if (this.m_timeControl != null)
|
||||
{
|
||||
this.m_timeControl.SetTime(playable.GetTime<Playable>());
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001E3 RID: 483 RVA: 0x00009D09 File Offset: 0x00007F09
|
||||
public override void OnBehaviourPlay(Playable playable, FrameData info)
|
||||
{
|
||||
if (this.m_timeControl != null)
|
||||
{
|
||||
if (!this.m_started)
|
||||
{
|
||||
this.m_timeControl.OnControlTimeStart();
|
||||
this.m_started = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001E4 RID: 484 RVA: 0x00009D3B File Offset: 0x00007F3B
|
||||
public override void OnBehaviourPause(Playable playable, FrameData info)
|
||||
{
|
||||
if (this.m_timeControl != null)
|
||||
{
|
||||
if (this.m_started)
|
||||
{
|
||||
this.m_timeControl.OnControlTimeStop();
|
||||
this.m_started = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000DE RID: 222
|
||||
private ITimeControl m_timeControl;
|
||||
|
||||
// Token: 0x040000DF RID: 223
|
||||
private bool m_started;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user