Пример #1
0
 /// <summary>
 /// 获取当前递归状态的状态链
 /// </summary>
 /// <param name="list"></param>
 /// <returns></returns>
 public List <T> GetStateList(ref List <T> list)
 {
     list.Add(DefaultValue);
     if (nextState != null)
     {
         nextState.GetStateList(ref list);
     }
     return(list);
 }
Пример #2
0
        public void ShowState()
        {
            List <int> tmp = new List <int>();
            string     s   = "value list is :";

            foreach (int t in state.GetStateList(ref tmp))
            {
                s += +t + " ";
            }
            Debug.Log("now value is :" + state.NowValue);
            Debug.Log(s);
        }