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 }
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); }
// Use this for initialization void Start() { canvas = GameObject.Find("Canvas"); panel = canvas.transform.Find("Panel").gameObject; next = panel.transform.GetChild(6).gameObject; con = FindObjectOfType <ES_MessageSystem>(); if (next == null) { Debug.Log("爛"); } else { next.SetActive(false); } }
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 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() { canvas = GameObject.Find("Canvas"); selectscene_panel = canvas.transform.Find("selectscene_panel").gameObject; panel = canvas.transform.Find("Panel").gameObject; NPC_2D = panel.transform.GetChild(1).gameObject; NPC_2D_big = panel.transform.GetChild(2).gameObject; Player_2D = panel.transform.GetChild(3).gameObject; nametext = panel.transform.GetChild(6).gameObject; text_word = panel.transform.GetChild(4).gameObject.GetComponent <Text>(); DialogueHolder_NPC = FindObjectOfType <DialogueHolder_NPC>(); //NPC_change=NPC_2D; //-------------------- NPC_image = NPC_2D.GetComponent <Image>(); NPC_B_image = NPC_2D_big.GetComponent <Image>(); NPC_anim = NPC_2D.GetComponent <Animator>(); NPC_B_anim = NPC_2D_big.GetComponent <Animator>(); //--------------------- UC = this.GetComponent <UsageCase>(); msgSys = this.GetComponent <ES_MessageSystem>(); player = FindObjectOfType <Animationcontorler>(); NPC = FindObjectOfType <DialogueHolder_player>(); if (panel != null) { panel.SetActive(false); selectscene_panel.SetActive(false); } else { Debug.Log("F**k!"); } time_i = 0; // Player_2D.SetActive(false); // NPC_2D.SetActive(false); fade_P = true; NPC_2D_big.SetActive(false); }
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() { con = FindObjectOfType <ES_MessageSystem>(); player_UI = this.GetComponent <Animator>(); player_UI.SetBool("Tbool", false); // idle }
void Start() { // story_number_assign=new int[story_count]; player = FindObjectOfType <Animationcontorler>(); player_check = GameObject.Find("player").gameObject.transform.GetChild(0).gameObject.GetComponent <DialogueHolder_player>(); talk = NPCcontroller_test.ins.gameObject.GetComponent <NPCcontroller_test>(); msgSys = GameObject.Find("talkmanager").GetComponent <ES_MessageSystem>(); option_0 = GameObject.Find("talkmanager").GetComponent <option>(); // pass_text=this.GetComponent<test>(); // M = Resources.Load <Sprite>("NPC/mom_idle_257x396_00"); Flower = Resources.Load <Sprite>("NPC/flower_idle_257x396_anim_00"); // Fu2 = Resources.Load<Sprite>("NPC/FU_character_0"); // M_anim = Resources.Load <RuntimeAnimatorController>("animator/mon_combine_257x396"); Flower_anim = Resources.Load <RuntimeAnimatorController>("animator/flower_anim_257x396"); Fu2_anim = Resources.Load <RuntimeAnimatorController>("animator/FU2_anim"); // txt_mom = Resources.Load <TextAsset>("txt/ui2"); txt_flower = Resources.Load <TextAsset>("txt/ui_flower"); txt_Fu2 = Resources.Load <TextAsset>("txt/ui_Fu2"); txt_TV = Resources.Load <TextAsset>("txt/ui_TV"); txt_book = Resources.Load <TextAsset>("txt/ui_book"); txt_fish = Resources.Load <TextAsset>("txt/ui_fish"); //一開始先用程式打好資料放在格子裡面 if (who == "NPC_mom") { anim = M_anim; cha = M; txt = txt_mom; } else if (who == "NPC_flower") { anim = Flower_anim; cha = Flower; txt = txt_flower; } else if (who == "NPC_fu2") { anim = Fu2_anim; cha = Fu2; txt = txt_Fu2; } else if (who == "TV") { //anim=Flower_anim; // cha=Flower; txt = txt_TV; } else if (who == "book") { txt = txt_book; } else if (who == "fish") { txt = txt_fish; } story_check = new bool[5]; check_big_image(); pass_test(txt);//用box,遇到誰,誰的資料就會轉換 輸出log }