public EasyAnimationState GetState(int stateIndex) { EasyAnimationState target = _stateManager.Find(stateIndex); if (target == null) { DebugLog.Error($"EasyAnimationPlayable.GetState : アニメーションステートが存在しないため取得できませんでした。{stateIndex}", DebugLogColor.animation); return(null); } return(target); }
public bool Add(AnimationClip clip, string stateName, PlayableGraph graph, AnimationMixerPlayable mixer) { var findState = Find(stateName); if (findState == null) { var addState = new EasyAnimationState(clip, stateName, graph); states.Add(addState); addState.Stop(); addState.index = states.Count - 1; int inputCount = addState.index + 1; mixer.SetInputCount(inputCount); graph.Connect(addState.Playable, 0, mixer, addState.index); DebugLog.Normal($"EasyAnimationStateManager.Add : アニメーションステートを追加しました。{clip.name}", DebugLogColor.animation); return(true); } DebugLog.Warning($"EasyAnimationStateManager.Add : 同名アニメーションステートが存在しているため、追加に失敗しました。{clip.name}", DebugLogColor.animation); return(false); }
public Map(EasyAnimationState state, EasyBlendMotion blend) { _state = state; _blend = blend; }