Reply To: onEnter() just call once when play again and startTime = 0?

Slate Forums Support onEnter() just call once when play again and startTime = 0? Reply To: onEnter() just call once when play again and startTime = 0?

#739
jakin
Participant

I try to modify here..seems ok for me

1, In Cutscene, this is for play again not call onEnter when startTime = 0

Before:
//update time
currentTime += playingDirection == PlayingDirection.Forwards? delta : -delta;

After:
if (playingDirection == PlayingDirection.Forwards)
{
if (currentTime >= previousTime) currentTime += delta;
}
else
{
if (currentTime <= previousTime) currentTime -= delta;
}

2, TriggerBackward In TimeInPointer, this is for click on timeline not call onEnter when clip startTime = 0
Before:
if (currentTime < target.startTime || currentTime <= 0)

After:
if (currentTime < target.startTime || currentTime <= 0 || (currentTime == float.Epsilon))