The skipTransition function¶
| Syntax: | skipTransition() |
|---|---|
| Returns: | nil |
This method is used to instantly finish any transitions currently affecting this object (except for color grading transitions), including fades and movement animations started with the move method.
Remarks¶
As blocking transitions pause the execution of the script, it is only possible to skip non-blocking transitions using this method.
Examples¶
-- Define a character sprite that uses "sakura1.png" as the base image
sakura = CharacterSprite.new("sakura1.png")
-- Make it visible with a smile expression
sakura:show("smiling")
-- Start a non blocking movement animation with a duration of 10 seconds
sakura:moveX(0, 10, false)
-- Wait 5 seconds
sleep(5)
-- Instantly finish the animation
sakura:skipTransition()