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

Function tweenVariableNumber

Extensions/TweenBehavior/tweentools.ts:349–372  ·  view source on GitHub ↗
(
        runtimeScene: RuntimeScene,
        identifier: string,
        variable: Variable,
        from: number,
        to: number,
        duration: number,
        easing: string
      )

Source from the content-addressed store, hash-verified

347 * See https://github.com/4ian/GDevelop/issues/4270
348 */
349 export const tweenVariableNumber = (
350 runtimeScene: RuntimeScene,
351 identifier: string,
352 variable: Variable,
353 from: number,
354 to: number,
355 duration: number,
356 easing: string
357 ) => {
358 getTweensMap(runtimeScene).addSimpleTween(
359 identifier,
360 runtimeScene,
361 duration / 1000,
362 easing,
363 linearInterpolation,
364 from,
365 to,
366 getTweenVariableSetter(variable),
367 {
368 type: 'variable',
369 variable,
370 }
371 );
372 };
373
374 /**
375 * @deprecated Use tweenVariableNumber3 instead.

Callers

nothing calls this directly

Calls 3

getTweensMapFunction · 0.85
addSimpleTweenMethod · 0.80
getTweenVariableSetterFunction · 0.70

Tested by

no test coverage detected