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

Function tweenVariableNumber3

Extensions/TweenBehavior/tweentools.ts:404–429  ·  view source on GitHub ↗
(
        runtimeScene: RuntimeScene,
        identifier: string,
        variable: Variable,
        toValue: number,
        easing: string,
        duration: number
      )

Source from the content-addressed store, hash-verified

402 * @param duration Duration in seconds
403 */
404 export const tweenVariableNumber3 = (
405 runtimeScene: RuntimeScene,
406 identifier: string,
407 variable: Variable,
408 toValue: number,
409 easing: string,
410 duration: number
411 ) => {
412 if (variable.getType() !== 'number') {
413 return;
414 }
415 getTweensMap(runtimeScene).addSimpleTween(
416 identifier,
417 runtimeScene,
418 duration,
419 easing,
420 linearInterpolation,
421 variable.getValue() as number,
422 toValue,
423 getTweenVariableSetter(variable),
424 {
425 type: 'variable',
426 variable,
427 }
428 );
429 };
430
431 /**
432 * @deprecated Use tweenCamera2 instead.

Callers 1

tweenVariableNumber2Function · 0.85

Calls 5

getTweensMapFunction · 0.85
addSimpleTweenMethod · 0.80
getTweenVariableSetterFunction · 0.70
getValueMethod · 0.65
getTypeMethod · 0.45

Tested by

no test coverage detected