void Awake() { // googleAnalytics.StartSession(); Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } googleAnalytics.LogScreen("Stage1_6"); player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; mbr = player.GetComponent <Moving_by_RLbuttons> (); //stone = GameObject.FindWithTag ("HandMirror"); // o_l = stone.GetComponent<Outline> (); i_c = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); //o_l = GameObject.Find ("Mirror_Socket").GetComponent<Outline> (); //o_l.used_or_not_for_retry = false; player.transform.position = start_pos.position; sceneNo = 17; ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); ti.Import(16); }
//private GameObject camera; void Awake() { player = GameObject.FindWithTag("Player"); start_pos = GameObject.Find("Start_Pos").transform; regen_pos = GameObject.Find("Regen_Pos").transform; player.transform.position = start_pos.position; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); textbox_Coco = ti._text_boxes [0]; textbox_Star = ti._text_boxes [1]; textbox_Racoon = ti._text_boxes [2]; textbox_Ivon = ti._text_boxes [3]; if (!Stage4_Controller.q[1]) { player.transform.localScale = new Vector3(1.4f, 1.4f, player.transform.localScale.z); } if (Stage4_Controller.q [13]) { Light.SetActive(false); } bb = new Color(0f, 0f, 0f, 1f); //검정,불투명 _blackout.color = bb; }
void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player")) { if (!Stage2_Controller._Stage2_Quest [16]) { _Switch.SetActive(true); _LightFromSide.SetActive(true); } Stage2_Controller._Stage2_Quest[16] = true; Save_Script.Save_Quest_Info(); if (Stage2_Controller._Stage2_Quest[17] && !Stage2_Controller._Stage2_Quest[22]) { _Switch.SetActive(true); _LightFromSide.SetActive(false); Item_Controller aa = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); for (int i = 0; i < 5; i++) { if (aa._item_name_list [i] == "태엽") { aa._consumable [i] = true; break; } } Stage2_Controller._Stage2_Quest[22] = true; Save_Script.Save_Quest_Info(); } } }
void Awake() { _player = GameObject.FindWithTag("Player"); i_c = GameObject.Find("Item_Canvas").GetComponent <Item_Controller>(); //멍멍이와의 충돌만 무시함. Physics2D.IgnoreCollision(_player.GetComponent <Collider2D> (), GetComponent <Collider2D> (), true); }
protected void Awake() { sceneNo = 35; Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } if (sceneNo == 35) { googleAnalytics.LogScreen("Stage3_5"); } else if (sceneNo == 36) { googleAnalytics.LogScreen("Stage3_6"); } player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; end_pos = GameObject.Find("End_Pos").transform; player.transform.position = start_pos.position; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); trees = GameObject.FindGameObjectsWithTag("Tree"); likeButton = GameObject.FindGameObjectsWithTag("likeButton"); }
void Awake() { player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); o_l_1.used_or_not_for_retry = true; o_l_2.used_or_not_for_retry = true; player.transform.position = start_pos.position; for (int i = 0; i < 5; i++) //s3 시작 시 템 없어야함. 카트에서 거울먹고 종료 후 이어하기 시 거울이 있ㅡㄴ 것ㅡㄹ 방지함 { ic._item_name_list [i] = ""; ic._usable_item[i] = false; ic._the_number_of_items[i] = 0; ic._interaction_object [i] = ""; ic._consumable [i] = false; ic._item_list [i].GetComponent <Image> ().color = new Color(1, 1, 1, 0); ic._item_list [i].transform.parent.GetComponentInChildren <Text> ().color = new Color(1, 1, 1, 0); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ic._explanations[i] = ""; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } }
void Awake() { ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); ti.Import(500); }
// void OnEnable(){ // _ic = GameObject.FindWithTag ("Item_Canvas").GetComponent<Item_Controller> (); // itemlist = _ic.GetComponentInChildren<TurnOnOffItemList> (); // for (int i = 0; i < _ic._item_list.Length; i++) { // if (_ic._item_name_list [i] == "Star") { // Star_pos = GameObject.Find ("Item_button_" + i).GetComponent<RectTransform> (); // } // } // } void Update() { // if (findIC == false) { // Debug.Log (GameObject.FindWithTag ("Item_Canvas").name); // _ic = GameObject.FindWithTag ("Item_Canvas").GetComponent<Item_Controller> (); // itemlist = _ic.GetComponentInChildren<TurnOnOffItemList> (); // if (Star_pos == null) { // for (int i = 0; i < _ic._item_list.Length; i++) { // if (_ic._item_name_list [i] == "Star") { // Star_pos = GameObject.Find ("Item_button_" + i).GetComponent<RectTransform> (); // } // } // } // Debug.Log ("4 find IC " + findIC); // findIC = true; // } //Debug.Log (GameObject.FindWithTag ("Item_Canvas").name); _ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); itemlist = _ic.GetComponentInChildren <TurnOnOffItemList> (); if (Star_pos == null) { for (int i = 0; i < _ic._item_list.Length; i++) { if (_ic._item_name_list [i] == "Star") { Star_pos = GameObject.Find("Item_button_" + i).GetComponent <RectTransform> (); } } } s.position = new Vector3(Star_pos.position.x - 50, Star_pos.position.y, Star_pos.position.z); itemlist.OnTime = Time.realtimeSinceStartup; }
void Awake() { // player = GameObject.Find ("Player"); i_c = GameObject.Find("Item_Canvas").GetComponent <Item_Controller>(); o_l = GetComponent <Outline> (); spr = this.GetComponent <SpriteRenderer> (); }
void Awake() { //mainCam = Camera.main; rectTransform = GetComponent <RectTransform> (); ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); itemlist = ic.GetComponentInChildren <TurnOnOffItemList> (); Debug.Log(nameFind); }
void Awake() { player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; regen_pos = GameObject.Find("Regen_Pos").transform; _ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); player.transform.position = start_pos.position; }
void Awake() { player = GameObject.Find("Player"); mbr = player.GetComponent <Moving_by_RLbuttons>(); i_c = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); umbrella = GameObject.Find("Umbrella"); hardbox = GameObject.Find("HardBox"); }
void Start() { player = GameObject.Find("Player"); Ivon = GameObject.Find("Ivon"); mbr = player.GetComponent <Moving_by_RLbuttons>(); start_pos = GameObject.Find("Start_Pos").transform; regen_pos = GameObject.Find("Regen_Pos").transform; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); rainIntensity = rainFall.transform.parent.gameObject.GetComponent <DigitalRuby.RainMaker.RainScript2D>(); _ivon_textbox = GameObject.FindGameObjectWithTag("Dialogue").transform.GetChild(2).GetComponent <Image>(); _ivon_text = GameObject.FindGameObjectWithTag("Dialogue").transform.GetChild(2).GetChild(0).GetComponent <Text>(); player.transform.position = start_pos.position; ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); //sparkle.transform.position = GameObject.FindWithTag("Item_Canvas").transform.GetChild(1).GetChild(0).position; ti.Import(64); //ti.Talk(); if (!Stage6_Controller.q[10]) { Save_Script.Save_Now_Point(); ti.Talk(); } else if (Stage6_Controller.q[10] && !Stage6_Controller.q[11]) { rainIntensity.RainIntensity = 0f; Ivon.SetActive(false); ti.Talk(10); // 응? } else if (Stage6_Controller.q[16] && !Stage6_Controller.q[17]) { rainIntensity.RainIntensity = 0f; Ivon.SetActive(false); ti.Talk(29); } else if (Stage6_Controller.q[21] && !Stage6_Controller.q[22]) { ti.Talk(39); } else if (Stage6_Controller.q[28] && !Stage6_Controller.q[29]) { _ivon_textbox.rectTransform.rotation = Quaternion.Euler(new Vector3(0, 0, 0)); _ivon_text.rectTransform.rotation = Quaternion.Euler(new Vector3(0, 0, 0)); // 도대체 왜 돌려지지... ti.Talk(48); // 코코야 왜 짖닝 portal6_5.enabled = false; ic._interaction_object[2] = "NPC"; // player.GetComponent<Outline>().used_or_not_for_retry = false; } else if (Stage6_Controller.q[49] && !Stage6_Controller.q[50]) { portal6_5.enabled = false; ic._interaction_object[2] = "NPC"; Ivon.GetComponent <Outline>().used_or_not_for_retry = false; ti.Talk(71); // 킄킄 이제 부적을 사용해서 돌아가자 } }
public static void Save_Item_Info() //아이템을 먹거나 사용할 때 호출 { _ic_for_Save = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); PlayerPrefsX.SetStringArray("IC_nameList", _ic_for_Save._item_name_list); PlayerPrefsX.SetBoolArray("Usable_item", _ic_for_Save._usable_item); PlayerPrefsX.SetIntArray("NumOfItem", _ic_for_Save._the_number_of_items); PlayerPrefsX.SetStringArray("Interaction", _ic_for_Save._interaction_object); PlayerPrefsX.SetBoolArray("Consumable", _ic_for_Save._consumable); }
//private Transform regen_pos; void Awake() { player = GameObject.Find("Player"); npc = GameObject.FindWithTag("NPC"); start_pos = GameObject.Find("Start_Pos").transform; player.transform.position = start_pos.position; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer>(); //regen_pos = GameObject.Find ("Regen_Pos").transform; }
void Awake() { player = GameObject.Find("Player"); Ivon = GameObject.Find("이본"); portal = GameObject.Find("Portal"); _t_i = GameObject.Find("Dialogue_Canvas_").GetComponent <Text_Importer> (); i_c = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); PlayerPrefs.DeleteAll(); tc = GameObject.FindWithTag("Controller").GetComponent <Tutorial_Controller>(); }
protected void Awake() { player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; end_pos = GameObject.Find("End_Pos").transform; player.transform.position = start_pos.position; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer>(); trees = GameObject.FindGameObjectsWithTag("Tree"); likeButton = GameObject.FindGameObjectsWithTag("likeButton"); }
//private Mirror_Socket_Controller msc; void Awake() { player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; //stone = GameObject.FindWithTag ("HandMirror"); // o_l = stone.GetComponent<Outline> (); i_c = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); //o_l = GameObject.Find ("Mirror_Socket").GetComponent<Outline> (); //o_l.used_or_not_for_retry = false; player.transform.position = start_pos.position; }
void OnEnable() { _ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); itemlist = _ic.GetComponentInChildren <TurnOnOffItemList> (); for (int i = 0; i < _ic._item_list.Length; i++) { if (_ic._item_name_list [i] == "별감") { Star_pos = GameObject.Find("Item_button_" + i).GetComponent <RectTransform> (); } } }
void Awake() { player = GameObject.FindWithTag("Player"); start_pos = GameObject.Find("Start_Pos").transform; player.transform.position = start_pos.position; ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); itemCanvas = GameObject.FindWithTag("Item_Canvas"); ic = itemCanvas.GetComponent <Item_Controller> (); textbox_Coco = ti._text_boxes [0]; textbox_Star = ti._text_boxes [1]; textbox_Racoon = ti._text_boxes [2]; textbox_Ivon = ti._text_boxes [3]; }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); mbr = player.GetComponent <Moving_by_RLbuttons>(); start_pos = GameObject.Find("Start_Pos").transform; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); player.transform.position = start_pos.position; ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); ti.Import(67); Save_Script.Save_Now_Point(); ti.Talk(); }
public void Skip_to_5() { PlayerPrefs.DeleteAll(); player.SetActive(true); item_Canvas.SetActive(true); //DontDestroyOnLoad (dialogue_Canvas); ic = item_Canvas.GetComponent <Item_Controller> (); //ti = dialogue_Canvas.GetComponent<Text_Importer> (); Selecting_stage._what_stage_now_cleared = 4; PlayerPrefs.SetInt("Stage_Now_Cleared", Selecting_stage._what_stage_now_cleared); SceneManager.LoadScene(3); ic._item_name_list [0] = "Diary"; ic._item_name_list [1] = "Star"; //ic._item_name_list [2] = "basil"; ic._usable_item [0] = false; ic._usable_item [1] = true; //ic._usable_item [2] = true; ic._the_number_of_items [0] = 1; ic._the_number_of_items [1] = 1; //ic._the_number_of_items [2] = 2; ic._interaction_object [0] = ""; ic._interaction_object [1] = "Player"; //ic._interaction_object [2] = "Basil"; ic._consumable [0] = false; ic._consumable [1] = false; //ic._consumable [2] = true; ic._explanations [0] = "Test용으로 넘어옴"; ic._explanations [1] = "Test용으로 넘어옴"; //ic._explanations [2] = "Test용으로 넘어옴"; for (int xx = 0; xx < ic._item_list.Length; xx++) { if (ic._item_name_list [xx] != "") { Texture2D assas = (Texture2D)Resources.Load("ItemPictures/" + ic._item_name_list [xx]); Rect r = new Rect(0, 0, assas.width, assas.height); ic._item_list [xx].GetComponent <Image> ().sprite = Sprite.Create(assas, r, new Vector2(0, 0)); ic._item_list [xx].GetComponent <Image> ().color = new Color(1, 1, 1, 1); ic._item_list [xx].transform.parent.GetComponentInChildren <Text> ().text = ic._the_number_of_items [xx].ToString(); ic._item_list [xx].transform.parent.GetComponentInChildren <Text> ().color = new Color(1, 1, 1, 1); } } //ti.Import (25); //_stage4_Controller.SetActive (true); //DontDestroyOnLoad (_stage4_Controller); }
void Awake() { Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } googleAnalytics.LogScreen("Stage4_5"); player = GameObject.FindWithTag("Player"); ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); controller = GameObject.Find("PuzzleController").GetComponent <GameController> (); }
void Q13_ClockWork() { if (_clockwork_ol.used_or_not_for_retry) { Stage2_Controller._Stage2_Quest_intArr[1]++; _cws.Play(); _clockwork_ol.used_or_not_for_retry = false; if (Stage2_Controller._Stage2_Quest_intArr[1] % 2 == 0) { if (!Stage2_Controller.q [22]) { _orgel.sprite = _day_orgel1; } } else { if (!Stage2_Controller.q [22]) { _orgel.sprite = _day_orgel2; } } if (Stage2_Controller._Stage2_Quest_intArr[1] == 1) { // _OrgelSound.SetActive (true); // _OrgelSound.GetComponent<AudioSource> ().volume = 0.4f; // _OrgelSound.transform.SetParent (GameObject.FindWithTag ("Controller").transform); ti.Talk(5); _clockwork_ol.GetComponent <BoxCollider2D>().enabled = false; GameObject _orgelsound = GameObject.FindWithTag("Controller").transform.GetChild(2).gameObject; _orgelsound.SetActive(true); _orgelsound.GetComponent <AudioSource> ().volume = 0.4f; Item_Controller aa = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); for (int i = 0; i < 5; i++) { if (aa._item_name_list [i] == "remotecon") { aa._consumable [i] = true; break; } } Stage2_Controller.q[18] = true; } } }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); mbr = player.GetComponent <Moving_by_RLbuttons>(); start_pos = GameObject.Find("Start_Pos").transform; //regen_pos = GameObject.Find("Regen_Pos").transform; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); rainIntensity = rainFall.transform.parent.gameObject.GetComponent <DigitalRuby.RainMaker.RainScript2D>(); // Portal.enabled = false; player.transform.position = start_pos.position; ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); ti.Import(62); Save_Script.Save_Now_Point(); ti.Talk(); }
void Awake() { Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } googleAnalytics.LogScreen("Stage3_2"); sceneNo = 32; player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; regen_pos = GameObject.Find("Regen_Pos").transform; _ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); player.transform.position = start_pos.position; }
void Awake() { Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } googleAnalytics.LogScreen("Stage5_7"); player = GameObject.Find("Player"); mbr = player.GetComponent <Moving_by_RLbuttons>(); start_pos = GameObject.Find("Start_Pos").transform; regen_pos = GameObject.Find("Regen_Pos").transform; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer>(); }
void Awake() { Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } googleAnalytics.LogScreen("Stage4_2"); player = GameObject.FindWithTag("Player"); start_pos = GameObject.Find("Start_Pos").transform; player.transform.position = start_pos.position; ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2> (); itemCanvas = GameObject.FindWithTag("Item_Canvas"); ic = itemCanvas.GetComponent <Item_Controller> (); sceneNo = 42; }
void Awake() { Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } googleAnalytics.LogScreen("Stage5_3"); sceneNo = 53; player = GameObject.Find("Player"); mbr = player.GetComponent <Moving_by_RLbuttons> (); start_pos = GameObject.Find("Start_Pos").transform; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller> (); player.transform.position = start_pos.position; }
void Awake() { Analyticslist = GameObject.FindGameObjectsWithTag("Analysis"); if (Analyticslist.Length > 1) { Destroy(Analyticslist[0]); } googleAnalytics.LogScreen("Stage3_4"); sceneNo = 34; player = GameObject.Find("Player"); start_pos = GameObject.Find("Start_Pos").transform; player.transform.position = start_pos.position; _Ivon_Position = GameObject.FindWithTag("NPC").transform; ic = GameObject.FindWithTag("Item_Canvas").GetComponent <Item_Controller>(); player.transform.localScale = new Vector3(1f, 1f, player.transform.localScale.z); }