Skip to content

AnimationBlendSelector2D.AddNode(float, float, string, Nullable) Method

Definition

Namespace: Brine2D.Animation

Adds a node associating a 2D position with a clip name. Evaluates immediately after adding.

public Brine2D.Animation.AnimationBlendSelector2D AddNode(float x, float y, string clipName, System.Nullable<float> speed=null);

Parameters

x System.Single

X coordinate in parameter space.

y System.Single

Y coordinate in parameter space.

clipName System.String

Name of the clip to play when the parameter is nearest this node.

speed System.Nullable<System.Single>

Optional Speed override at this node. When the two nearest nodes both carry a speed, the animator speed is linearly interpolated between them based on the distances to each node. A value of 0 freezes the animator when AllowZeroSpeed is true; otherwise it is floored at 0.001.

Returns

AnimationBlendSelector2D