From 0042f944268dccea66125ee680339419c1dca34d Mon Sep 17 00:00:00 2001 From: agargaro Date: Fri, 15 Sep 2023 20:37:32 +0200 Subject: [PATCH] Added Tween set action --- src/tweening/Tween.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tweening/Tween.ts b/src/tweening/Tween.ts index 383e34f..efe2cbc 100644 --- a/src/tweening/Tween.ts +++ b/src/tweening/Tween.ts @@ -66,6 +66,16 @@ export class Tween { return this; } + /** + * Define a movement from the current state to a new state instantaneously. + * @param action - The motion configuration. + * @returns The updated Tween instance. + */ + public set(action: Motion): this { + this.actions.push(new ActionMotion(0, action, {}, false)); + return this; + } + /** * Add a callback action to the Tween. * @param callback - The callback function to execute.