Skip to content

AnimationStateMachine.OnStateEnter(string, Action) Method

Definition

Namespace: Brine2D.Animation

Registers a callback to invoke whenever the named state is entered. The callback receives the name of the previous state (or null if this is the first state entered). Multiple callbacks per state are supported; each call appends to the subscription list. Use RemoveStateEnterCallback(string, Action<string>) with the exact delegate to remove a specific subscription.

public Brine2D.Animation.AnimationStateMachine OnStateEnter(string stateName, System.Action<string?> callback);

Parameters

stateName System.String

callback System.Action<System.String>

Returns

AnimationStateMachine