public Animator NPC_anim, NPC_B_anim; //主要使用 // Use this for initialization void Awake() { if (ins == null) { ins = this; } }
// public int tranform; // Use this for initialization void Start() { // select_script = FindObjectOfType<select_script>(); //select_script = GameObject.Find("talkmanager").GetComponent<select_script>(); select_script = this.GetComponent <select_script>(); Animationcontorler = GameObject.Find("player").GetComponent <Animationcontorler>(); UsageCase = GameObject.Find("talkmanager").GetComponent <UsageCase>(); talk = NPCcontroller_test.ins.gameObject.GetComponent <NPCcontroller_test>(); string_where = "該去哪裡呢?"; }
// Use this for initialization void Start() { canvas = GameObject.Find("Canvas"); panel = canvas.transform.Find("Panel").gameObject; text = panel.transform.GetChild(5).gameObject; T = text.GetComponent <Text>(); NPC = FindObjectOfType <NPCcontroller_test>(); // T.text = "Test"; }
// Use this for initialization void Start() { canvas = GameObject.Find("Canvas"); panel = canvas.transform.Find("Panel").gameObject; nametext = panel.transform.GetChild(5).gameObject; o = panel.transform.GetChild(0).gameObject; N = panel.transform.GetChild(1).gameObject; N_big = panel.transform.GetChild(2).gameObject; P = panel.transform.GetChild(3).gameObject; Text = panel.transform.GetChild(4).gameObject; P_C = o.GetComponent <Image>(); N_C = N.GetComponent <Image>(); N_B_C = N_big.GetComponent <Image>(); P_P_C = P.GetComponent <Image>(); N_vector = N.GetComponent <RectTransform>(); N_B_vector = N_big.GetComponent <RectTransform>(); P_vector = P.GetComponent <RectTransform>(); Text_T = Text.GetComponent <Text>(); Text_name = nametext.GetComponent <Text>(); // mys = FindObjectOfType<ES_MessageSystem>(); NPC = FindObjectOfType <NPCcontroller_test>(); player = FindObjectOfType <DialogueHolder_player>(); P_C_a = 0; //立繪移動 N_a = -171; N_B_a = -137; P_a = 155; // P_C.color = new Color(P_C.color.r, P_C.color.g, P_C.color.b, P_C_a); N_C.color = new Color(N_C.color.r, N_C.color.g, N_C.color.b, P_C_a); N_B_C.color = new Color(N_B_C.color.r, N_B_C.color.g, N_B_C.color.b, 0); P_P_C.color = new Color(P_P_C.color.r, P_P_C.color.g, P_P_C.color.b, P_C_a); Text_T.color = new Color(Text_T.color.r, Text_T.color.g, Text_T.color.b, P_C_a); Text_name.color = new Color(Text_name.color.r, Text_name.color.g, Text_name.color.b, P_C_a); N_vector.anchoredPosition = new Vector2(N_a, N_vector.anchoredPosition.y); //-157 73 N_B_vector.anchoredPosition = new Vector2(N_B_a, N_B_vector.anchoredPosition.y); P_vector.anchoredPosition = new Vector2(P_a, P_vector.anchoredPosition.y); //142 60 }
// Use this for initialization void Awake() { NPC_Talk = GameObject.Find("talkmanager").GetComponent <NPCcontroller_test>(); // NPC_Talk = FindObjectOfType<DialogueHolder_NPC>(); canvas = GameObject.Find("Canvas"); option_0 = canvas.transform.Find("option").gameObject; Image = option_0.transform.GetChild(0).gameObject; S_0 = option_0.transform.GetChild(1).gameObject; S_1 = option_0.transform.GetChild(2).gameObject; test_s0 = S_0.GetComponent <Text>(); test_s1 = S_1.GetComponent <Text>(); if (option_0 != null) { option_0.SetActive(false); } else { Debug.Log("F**k!"); } test_color_volume = 0; }
// Use this for initialization void Start() { tt = 0; map = new GameObject[5]; Animationcontorler = GameObject.Find("player").GetComponent <Animationcontorler>(); loading = FindObjectOfType <loading>(); NPCcontroller_test = NPCcontroller_test.ins.gameObject.GetComponent <NPCcontroller_test>(); canvas = GameObject.Find("Canvas"); select_panel = canvas.transform.Find("selectscene_panel").gameObject; select = select_panel.transform.GetChild(0).gameObject; maplist = select_panel.transform.GetChild(1).gameObject; scene_anim = select_panel.GetComponent <Animator>(); scene_image = select_panel.GetComponent <Image>(); /* for (int i = 1; i < 4; i++) { * maplist.transform.GetChild(i).gameObject.SetActive(false); * } */ for (int i = 0; i < 5; i++) { t = maplist.transform.GetChild(i).gameObject; /* if (t.activeInHierarchy == false) * { */ map[tt] = maplist.transform.GetChild(i).gameObject; map[tt].SetActive(false); tt++; //} } map[0].GetComponent <Text>().text = "浮士德"; //select_panel.SetActive(false); k = 0; k2 = 0; story_index = 3; }
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 }