DirectionalAnimationSet8 Class

Summary

A set of up/down/left/right animations with diagonals as well.
Assembly
Animancer.dll
Namespace
Animancer
Interfaces
  • IAnimationClipSource
Base Types
graph BT Type-->Base0["DirectionalAnimationSet"] click Base0 "/animancer/api/Animancer/DirectionalAnimationSet" Base0-->Base1["ScriptableObject"] Type-.->Interface0["IAnimationClipSource"] Type["DirectionalAnimationSet8"] class Type type-node

Syntax

[CreateAssetMenu(menuName = Strings.MenuPrefix + "Directional Animation Set/8 Directions", order = Strings.AssetMenuOrder + 11)]
[HelpURL(Strings.APIDocumentationURL + "/" + nameof(DirectionalAnimationSet8))]
public class DirectionalAnimationSet8 : DirectionalAnimationSet, IAnimationClipSource

Attributes

Type Description
CreateAssetMenuAttribute
HelpURLAttribute

Properties

Name Value Summary
ClipCount int
The number of animations in this set.
Down AnimationClip
[UnityEngine.SerializeField] The animation facing down.
DownLeft AnimationClip
[UnityEngine.SerializeField] The animation facing diagonally down-left.
DownRight AnimationClip
[UnityEngine.SerializeField] The animation facing diagonally down-right.
Left AnimationClip
[UnityEngine.SerializeField] The animation facing left.
Right AnimationClip
[UnityEngine.SerializeField] The animation facing right.
Up AnimationClip
[UnityEngine.SerializeField] The animation facing up.
UpLeft AnimationClip
[UnityEngine.SerializeField] The animation facing diagonally up-left.
UpRight AnimationClip
[UnityEngine.SerializeField] The animation facing diagonally up-right.

Methods

Name Value Summary
AddClips(AnimationClip[], int) void
Adds all animations from this set to the `clips`, starting from the specified `index`.
AddClipsAndDirections(AnimationClip[], Vector2[], int) void
Calls Animancer.DirectionalAnimationSet.AddClips(UnityEngine.AnimationClip[],System.Int32) and Animancer.DirectionalAnimationSet.AddDirections(UnityEngine.Vector2[],System.Int32).
AddDirections(Vector2[], int) void
Adds unit vectors corresponding to each of the animations in this set to the `directions`, starting from the specified `index`.
DirectionToVector(DirectionalAnimationSet.Direction) Vector2
Returns a vector representing the specified `direction`.
static
DirectionToVector(DirectionalAnimationSet8.Direction) Vector2
Returns a vector representing the specified `direction`.
static
GetAnimationClips(List<AnimationClip>) void
[IAnimationClipSource] Adds all animations from this set to the `clips`.
GetClip(DirectionalAnimationSet.Direction) AnimationClip
Returns the animation associated with the specified `direction`.
GetClip(DirectionalAnimationSet8.Direction) AnimationClip
Returns the animation associated with the specified `direction`.
GetClip(int) AnimationClip
Returns the animation associated with the specified `direction`.
GetClip(Vector2) AnimationClip
Returns the animation closest to the specified `direction`.
GetDirection(int) Vector2
Returns a vector representing the specified `direction`.
GetDirectionName(int) string
Returns the name of the specified `direction`.
SetClip(DirectionalAnimationSet.Direction, AnimationClip) void
Sets the animation associated with the specified `direction`.
SetClip(DirectionalAnimationSet8.Direction, AnimationClip) void
Sets the animation associated with the specified `direction`.
SetClip(int, AnimationClip) void
Sets the animation associated with the specified `direction`.
SetClipByName(AnimationClip) int
[Editor-Only] Attempts to assign the `clip` to one of this set's fields based on its name and returns the direction index of that field (or -1 if it was unable to determine the direction).
SetDown(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet.Down animation.
SetDownLeft(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet8.DownLeft animation.
SetDownRight(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet8.DownRight animation.
SetLeft(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet.Left animation.
SetRight(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet.Right animation.
SetUp(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet.Up animation.
SetUpLeft(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet8.UpLeft animation.
SetUpRight(AnimationClip) void
Sets the Animancer.DirectionalAnimationSet8.UpRight animation.
Snap(Vector2) Vector2
Returns a copy of the `vector` pointing in the closest direction this set has an animation for.
SnapVectorToDirection(Vector2) Vector2
Returns a copy of the `vector` pointing in the closest direction this set type has an animation for.
static
SnapVectorToDirection(Vector2) Vector2
Returns a copy of the `vector` pointing in the closest direction this set type has an animation for.
static
VectorToDirection(Vector2) DirectionalAnimationSet8.Direction
Returns the direction closest to the specified `vector`.
static
VectorToDirection(Vector2) DirectionalAnimationSet.Direction
Returns the direction closest to the specified `vector`.
static