Ejemplo n.º 1
0
 public void UpdateAnimation()
 {
     if (protagonist.GetStage() != tempStage)
     {
         if (protagonist.GetStage() == "中年期")
         {
             animator.SetTrigger("Middle");
         }
         else if (protagonist.GetStage() == "老年期")
         {
             animator.SetTrigger("Old");
         }
     }
     tempStage = protagonist.GetStage();
 }
Ejemplo n.º 2
0
 void Start()
 {
     animator    = GetComponent <Animator>();
     protagonist = GetComponent <Protagonist>();
     tempStage   = protagonist.GetStage();
     EventCenter.GetInstance().AddEventListener("UpdateAnimation", UpdateAnimation);
 }
Ejemplo n.º 3
0
    void UpdateBehavPanel()
    {
        List <string> tmpBebav = new List <string>(behavDic["全阶段"]);

        tmpBebav.AddRange(behavDic[_protagonist.GetStage()]);
        if (tmpBebav.Count == viewers.Length)
        {
            for (int i = 0; i < tmpBebav.Count; i++)
            {
                viewers[i].toggleObject.isOn    = false;
                viewers[i].toggleSelection.text = tmpBebav[i];
            }
        }
    }