コード例 #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();
 }
コード例 #2
0
 void Start()
 {
     animator    = GetComponent <Animator>();
     protagonist = GetComponent <Protagonist>();
     tempStage   = protagonist.GetStage();
     EventCenter.GetInstance().AddEventListener("UpdateAnimation", UpdateAnimation);
 }
コード例 #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];
            }
        }
    }