public bool SetPlayAnimState(AnimalPlayState _playState)
 {
     this.InAnimState.Clear();
     this.OutAnimState.Clear();
     this.PlayState = _playState;
     if (!this.AnimatorEnable || _playState == null)
     {
         return(false);
     }
     this.animator.set_runtimeAnimatorController(_playState.MainStateInfo.Controller);
     AnimalPlayState.PlayStateInfo mainStateInfo = _playState.MainStateInfo;
     if (!((IReadOnlyList <AnimalPlayState.StateInfo>)mainStateInfo.InStateInfos).IsNullOrEmpty <AnimalPlayState.StateInfo>())
     {
         foreach (AnimalPlayState.StateInfo inStateInfo in mainStateInfo.InStateInfos)
         {
             this.InAnimState.Enqueue(inStateInfo);
         }
     }
     if (!((IReadOnlyList <AnimalPlayState.StateInfo>)mainStateInfo.OutStateInfos).IsNullOrEmpty <AnimalPlayState.StateInfo>())
     {
         foreach (AnimalPlayState.StateInfo outStateInfo in mainStateInfo.OutStateInfos)
         {
             this.OutAnimState.Enqueue(outStateInfo);
         }
     }
     return(true);
 }
        protected bool SetSchedule(AnimalPlayState.PlayStateInfo _stateInfo)
        {
            if (_stateInfo == null)
            {
                this.schedule = new AnimalSchedule(false, DateTime.MinValue, TimeSpan.Zero, false);
                return(false);
            }
            int num1 = Mathf.Min(_stateInfo.LoopMin, _stateInfo.LoopMax);
            int num2 = Mathf.Max(_stateInfo.LoopMin, _stateInfo.LoopMax);
            int num3 = num1 == num2 ? num1 : Random.Range(num1, num2 + 1);

            this.schedule = new AnimalSchedule(_stateInfo.IsLoop, Singleton <Manager.Map> .Instance.Simulator.Now, TimeSpan.FromMinutes((double)num3), true);
            return(true);
        }