void Start() { msgSys = this.GetComponent <ES_MessageSystem>(); if (uiText.text == null) { Debug.LogError("UIText Component not assign."); } else { ReadTextDataFromAsset(textAsset); } triggerd = false; messagePanel.SetActive(false); //add special chars and functions in other component. msgSys.AddSpecialCharToFuncMap("UsageCase", CustomizedFunction); msgSys.AddSpecialCharToFuncMap("hide", hide); msgSys.AddSpecialCharToFuncMap("show", show); msgSys.AddSpecialCharToFuncMap("rst", reset); msgSys.AddSpecialCharToFuncMap("tmp", tmp); msgSys.AddSpecialCharToFuncMap("slct", select); msgSys.AddSpecialCharToFuncMap("trans", transformer); msgSys.AddSpecialCharToFuncMap("result", result); msgSys.AddSpecialCharToFuncMap("menu", menu); msgSys.AddSpecialCharToFuncMap("citi", citizen); }
void Start() { msgSys = this.GetComponent <ES_MessageSystem>(); if (uiText == null) { Debug.LogError("UIText Component not assign."); } else { ReadTextDataFromAsset(textAsset); } //add special chars and functions in other component. msgSys.AddSpecialCharToFuncMap("UsageCase", CustomizedFunction); }
void Awake() { Canvas = GameObject.Find("Canvas"); Panel = Canvas.transform.Find("Panel").gameObject; Text = Panel.transform.GetChild(4).gameObject; uiText = Text.GetComponent <UnityEngine.UI.Text>(); msgSys = this.GetComponent <ES_MessageSystem>(); // 讀取ES的程式碼 // panel = GameObject.Find("Panel"); // NPC = this.GetComponent<NPCcontroller_test>(); /* if (uiText == null) //如果沒有文字就會跑出Debug * { * Debug.LogError("UIText Component not assign."); * } * else //有文字就會跑出來 * ReadTextDataFromAsset(textAsset); */ //add special chars and functions in other component. msgSys.AddSpecialCharToFuncMap("UsageCase", CustomizedFunction); //呼叫其程式碼的動作specialCharFuncMap }
void Start() { msgSys = this.GetComponent <ES_MessageSystem>(); if (uiText == null) { Debug.LogError("UIText Component not assign."); } else { ReadTextDataFromAsset(textAsset); } //add special chars and functions in other component. msgSys.AddSpecialCharToFuncMap("solar", CustomizedFunction); msgSys.AddSpecialCharToFuncMap("massdriver", massdriver); msgSys.AddSpecialCharToFuncMap("MPD", MPD); msgSys.AddSpecialCharToFuncMap("NEMP", NEMP); msgSys.AddSpecialCharToFuncMap("Bussard", Bussard); msgSys.AddSpecialCharToFuncMap("wormhole", wormhole); }
void Start() { Panel = GameObject.Find("TalkCanvas"); Select = GameObject.Find("SelectCanvas"); Panel.SetActive(false); Select.SetActive(false); CCG.color = new Color(255, 255, 255, 0); Name.color = new Color(0, 0, 0, 0); msgSys = this.GetComponent <ES_MessageSystem>(); MaSys = this.GetComponent <MainSystem>(); if (uiText == null) { Debug.LogError("UIText Component not assign."); } //add special chars and functions in other component. msgSys.AddSpecialCharToFuncMap("AcceptMission", TakeMission); msgSys.AddSpecialCharToFuncMap("Close", Closedialog); msgSys.AddSpecialCharToFuncMap("Select", AwakeSelect); msgSys.AddSpecialCharToFuncMap("Ans1", Skiptalk1); msgSys.AddSpecialCharToFuncMap("Ans2", Skiptalk2); #region CCG msgSys.AddSpecialCharToFuncMap("M1", M1); msgSys.AddSpecialCharToFuncMap("M2", M2); msgSys.AddSpecialCharToFuncMap("M6", M6); msgSys.AddSpecialCharToFuncMap("A1", A1); msgSys.AddSpecialCharToFuncMap("A4", A4); msgSys.AddSpecialCharToFuncMap("A5", A5); #endregion }