MCPcopy
hub / github.com/4ian/GDevelop / stopTween

Method stopTween

Extensions/TweenBehavior/TweenManager.ts:372–381  ·  view source on GitHub ↗

* Stop a tween. * @param identifier Unique id to identify the tween * @param jumpToDest Move to destination

(identifier: string, jumpToDest: boolean)

Source from the content-addressed store, hash-verified

370 * @param jumpToDest Move to destination
371 */
372 stopTween(identifier: string, jumpToDest: boolean) {
373 const tween = this._tweens.get(identifier);
374 if (!tween || tween.hasFinished()) {
375 return;
376 }
377 if (tween.isPlaying()) {
378 this._removeActiveTween(tween);
379 }
380 tween.stop(jumpToDest);
381 }
382
383 /**
384 * Remove a tween.

Callers 2

stopSceneTweenFunction · 0.45

Calls 5

_removeActiveTweenMethod · 0.95
getMethod · 0.65
hasFinishedMethod · 0.65
isPlayingMethod · 0.65
stopMethod · 0.65

Tested by

no test coverage detected