/************************************************************************************************************************/ /// <summary> /// Sets the target 'layer' and sorts its states and their keys into the active/inactive lists. /// </summary> private void GatherStates(AnimancerLayer layer) { Layer = layer; ActiveStates.Clear(); InactiveStates.Clear(); foreach (var state in layer) { if (HideInactiveStates && state.Weight == 0) { continue; } if (!SeparateActiveFromInactiveStates || state.Weight != 0) { ActiveStates.Add(state); } else { InactiveStates.Add(state); } } SortAndGatherKeys(ActiveStates); SortAndGatherKeys(InactiveStates); }
/************************************************************************************************************************/ public static void ClearQueue(AnimancerLayer layer) { PlayableToQueue.Remove(layer); }
/************************************************************************************************************************/ /// <summary> /// Creates and returns a new <see cref="ClipState"/> connected to the `layer`. /// <para></para> /// This method also assigns it as the <see cref="AnimancerState.Transition{TState}.State"/>. /// </summary> public override ClipState CreateState(AnimancerLayer layer) { return(State = new ClipState(layer, _Clip)); }