Tuesday, October 25, 2022
HomeGame DevelopmentThe right way to pause and resume tween? - Cocos Creator

The right way to pause and resume tween? – Cocos Creator


i wish to pause tween and when wanted wish to resume it fairly than cease and begin over once more , is there any means to take action?


please check with this : cc.TweenSystem.occasion.ActionManager.pauseTarget(…)

   /**
         * @en Pauses the goal: all working actions and newly added actions can be paused.
         * @zh 暂停指定对象:所有正在运行的动作和新添加的动作都将会暂停。
         * @technique pauseTarget
         * @param {Node} goal
         */
        pauseTarget(goal: Node): void;



1 Like

my want is as following :
tween1 working
clicked on object
tween1 paused
tween2 began (similar node)
when tween2 end tween1 resumes from the place it was paused

As you described, it’s endorsed to make use of delay.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments