Table of Contents

Class MethodTweener

Namespace
Godot
Assembly
GodotSharp.dll

MethodTweener is similar to a combination of CallbackTweener and PropertyTweener. It calls a method providing an interpolated value as a parameter. See TweenMethod(Callable, Variant, Variant, double) for more usage information.

The tweener will finish automatically if the callback's target object is freed.

Note: TweenMethod(Callable, Variant, Variant, double) is the only correct way to create MethodTweener. Any MethodTweener created manually will not function correctly.

public class MethodTweener : Tweener, IDisposable
Inheritance
MethodTweener
Implements
Inherited Members

Constructors

MethodTweener()

public MethodTweener()

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

SetDelay(double)

Sets the time in seconds after which the MethodTweener will start interpolating. By default there's no delay.

public MethodTweener SetDelay(double delay)

Parameters

delay double

Returns

MethodTweener

SetEase(EaseType)

Sets the type of used easing from Tween.EaseType. If not set, the default easing is used from the Tween that contains this Tweener.

public MethodTweener SetEase(Tween.EaseType ease)

Parameters

ease Tween.EaseType

Returns

MethodTweener

SetTrans(TransitionType)

Sets the type of used transition from Tween.TransitionType. If not set, the default transition is used from the Tween that contains this Tweener.

public MethodTweener SetTrans(Tween.TransitionType trans)

Parameters

trans Tween.TransitionType

Returns

MethodTweener