private void StartScriptableAnim(ScriptableAnimationStateWrapper state, PlayMode mode) { if (_scriptableAnims == null) { _scriptableAnims = new ScriptableAnimCollection(this); } if (mode == PlayMode.StopAll) { _scriptableAnims.Clear(); } else { _scriptableAnims.Remove(state.Layer); } _scriptableAnims.Add(state); }
internal static ISPAnim CreateScriptableAnimState(SPAnimationController controller, IScriptableAnimationClip clip) { if (controller == null) { throw new System.ArgumentNullException("controller"); } if (clip == null) { throw new System.ArgumentNullException("clip"); } var st = clip.GetState(controller); if (st == null) { return(SPAnim.Null); } var state = new ScriptableAnimationStateWrapper(); state.Init(controller, st); return(state); }