public void UpdateAnimation() { if (protagonist.GetStage() != tempStage) { if (protagonist.GetStage() == "中年期") { animator.SetTrigger("Middle"); } else if (protagonist.GetStage() == "老年期") { animator.SetTrigger("Old"); } } tempStage = protagonist.GetStage(); }
void Start() { animator = GetComponent <Animator>(); protagonist = GetComponent <Protagonist>(); tempStage = protagonist.GetStage(); EventCenter.GetInstance().AddEventListener("UpdateAnimation", UpdateAnimation); }
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]; } } }