Replies: 2 comments 2 replies
-
|
The amount of times I wanted a delay of ONE frame but primetween complained when I tried to put in a delay value of "0.001" or something, is too damn high. Or even zero frames. Sometimes I define the delay from the inspector - and sometimes, in that inspector I put in 0, and I wish it to be zero. It's annoying to do checks around that. It's not as useful for actual animations (since different PCs have different framerates), but a delay of a few frames can be helpful during initialization steps sometimes. UI in my game isn't initialized for 2 frames after the scene loads, for example - and while I wouldn't use this feature to work around that specifically, I can see the appeal. |
Beta Was this translation helpful? Give feedback.
-
|
@floky Hey, thanks for the suggestion! I thought about this problem a lot, but I don't have a good solution. The issue is that PrimeTween uses Additionally, if a Sequence has any frame-based tween in it, then using To address @octia concern with zero-duration tweens, you can disable the warning with To address the unknown duration problem and to allow waiting on custom user-specifid events, I thought about having a new concept in PrimeTween, something like Waiter waiter = Waiter.DelayFrames(numOfFrames: 5)
.Chain(Waiter.WaitWhile(enemy => enemy.isAlive))
.ChainDelay(1f)
.ChainCallback(() => print("done"));
//...
if (waiter.isAlive) {
waiter.Cancel();
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Although not obvious at first sight, it would be highly useful for various custom scenarios to have a Tween.Delay that waits for a number of frames instead of a duration in seconds.
Is this possible to easily add with the current API?
Beta Was this translation helpful? Give feedback.
All reactions