修改timeline 逻辑
This commit is contained in:
parent
5b39ed7377
commit
66ce882ebb
@ -64,6 +64,7 @@ public class TimeLineAction : IAction
|
||||
{
|
||||
play.Stop();
|
||||
play.time = curEndFrame / 24;
|
||||
play.Evaluate();
|
||||
}
|
||||
if (play.state != PlayState.Playing)
|
||||
{
|
||||
@ -109,17 +110,31 @@ public class TimeLineAction : IAction
|
||||
{
|
||||
curSpeed = 1;
|
||||
}
|
||||
if (!play.playableGraph.IsValid())
|
||||
{
|
||||
play.RebuildGraph();
|
||||
}
|
||||
play.playableGraph.GetRootPlayable(0).SetSpeed(curSpeed);
|
||||
play.Play();
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(endFrame) == false)
|
||||
{
|
||||
float.TryParse(endFrame, out curEndFrame);
|
||||
}
|
||||
|
||||
if (!play.playableGraph.IsValid())
|
||||
{
|
||||
play.RebuildGraph();
|
||||
}
|
||||
if (curFrame == curEndFrame)
|
||||
{
|
||||
play.time = curEndFrame / 24;
|
||||
play.Evaluate();
|
||||
Finished();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
play.playableGraph.GetRootPlayable(0).SetSpeed(curSpeed);
|
||||
play.Play();
|
||||
}
|
||||
|
||||
|
||||
bool iswait = true;
|
||||
bool.TryParse(isWait, out iswait);
|
||||
if (iswait == false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user