/// <summary> /// 觸發事件 /// </summary> void TriggerEvent() { switch (Events[NextEvent]) { case MilestoneEvent.Monster: FightScene.MeetEnemy(MonsterGetter.GetMonsterDicsFromEvent(MyAdventure.MonsterEvent)); //遭遇敵人 break; case MilestoneEvent.Accident: CharaDataUI.ShowCharas(false); //隱藏腳色資料介面 AccidentUI.CallAccident(EventGetter.GetAccidentInGroup(MyAdventure.AccidentGroup)); //呼叫意外事件 FightScene.AccidentEvent(); //遭遇意外事件 break; case MilestoneEvent.Investigate: CharaDataUI.ShowCharas(false); //隱藏腳色資料介面 InvestigateUI.CallInvestigate(EventGetter.GetInvestigateInGroup(MyAdventure.InvestigateGroup)); //呼叫調查事件 FightScene.InvestigateEvent(); //遭遇調查事件 break; case MilestoneEvent.Camp: CharaDataUI.ShowCharas(false); //隱藏腳色資料介面 CampUI.CallCamp(EventGetter.GetCampInGroup(MyAdventure.CampGroup)); //呼叫紮營事件 FightScene.InvestigateEvent(); //遭遇調查事件 break; } NextEvent++; }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
public void Init() { MyInvestigateUI = transform.FindChild("Investigate").GetComponent <InvestigateUI>(); MyInvestigateUI.Init(); MyResultUI = transform.FindChild("Result").GetComponent <ResultUI>(); MyResultUI.Init(); MyAccidentUI = transform.FindChild("Accident").GetComponent <AccidentUI>(); MyAccidentUI.Init(); MyCampUI = transform.FindChild("Camp").GetComponent <CampUI>(); MyCampUI.Init(); }
public void Init() { MyInvestigateUI = transform.FindChild("Investigate").GetComponent<InvestigateUI>(); MyInvestigateUI.Init(); MyResultUI = transform.FindChild("Result").GetComponent<ResultUI>(); MyResultUI.Init(); MyAccidentUI = transform.FindChild("Accident").GetComponent<AccidentUI>(); MyAccidentUI.Init(); MyCampUI = transform.FindChild("Camp").GetComponent<CampUI>(); MyCampUI.Init(); }
/// <summary> /// 初始化 /// </summary> public void Init() { MyGameobject = gameObject; MyCamp = this; //情境 Go_Scenario = transform.FindChild("Scenario").gameObject; Text_Scenario = Go_Scenario.transform.FindChild("description").GetComponent <Text>(); //對話 Go_Talk = transform.FindChild("Talk").gameObject; Image_Talk = Go_Talk.transform.FindChild("PlayerToken").FindChild("IconMask").FindChild("icon").GetComponent <Image>(); Text_Talk = Go_Talk.transform.FindChild("description").GetComponent <Text>(); //選擇 Go_Choice = transform.FindChild("Choice").gameObject; Image_ChoiceIcon = Go_Choice.transform.FindChild("PlayerToken").FindChild("IconMask").FindChild("icon").GetComponent <Image>(); Text_Confirm = Go_Choice.transform.FindChild("Confirm").FindChild("Text").GetComponent <Text>(); Text_Cancel = Go_Choice.transform.FindChild("Cancel").FindChild("Text").GetComponent <Text>(); ShowCampUI(false); }
/// <summary> /// 初始化 /// </summary> public void Init() { MyGameobject = gameObject; MyCamp = this; //情境 Go_Scenario = transform.FindChild("Scenario").gameObject; Text_Scenario = Go_Scenario.transform.FindChild("description").GetComponent<Text>(); //對話 Go_Talk = transform.FindChild("Talk").gameObject; Image_Talk = Go_Talk.transform.FindChild("PlayerToken").FindChild("IconMask").FindChild("icon").GetComponent<Image>(); Text_Talk = Go_Talk.transform.FindChild("description").GetComponent<Text>(); //選擇 Go_Choice = transform.FindChild("Choice").gameObject; Image_ChoiceIcon = Go_Choice.transform.FindChild("PlayerToken").FindChild("IconMask").FindChild("icon").GetComponent<Image>(); Text_Confirm = Go_Choice.transform.FindChild("Confirm").FindChild("Text").GetComponent<Text>(); Text_Cancel = Go_Choice.transform.FindChild("Cancel").FindChild("Text").GetComponent<Text>(); ShowCampUI(false); }