public void Update()
{
if (!this.m_DeltaTimeSet)
{
if (this.playing)
{
double timeSinceStartup = EditorApplication.timeSinceStartup;
this.deltaTime = ((float) (timeSinceStartup - this.m_LastFrameEditorTime)) * this.playbackSpeed;
this.m_LastFrameEditorTime = timeSinceStartup;
}
else
{
this.deltaTime = 0f;
}
}
this.currentTime += this.deltaTime;
if ((this.loop && this.playing) && !this.m_NextCurrentTimeSet)
{
this.normalizedTime = Mathf.Repeat(this.normalizedTime, 1f);
}
else
{
if (this.normalizedTime > 1f)
{
this.playing = false;
this.m_ResetOnPlay = true;
}
this.normalizedTime = Mathf.Clamp01(this.normalizedTime);
}
this.m_DeltaTimeSet = false;
this.m_NextCurrentTimeSet = false;
}