void OnMouseDown() { if (!Stage3_Controller._stage3_q11) { Stage3_Controller._stage3_q11 = true; ti.NPC_Say_yeah("별감"); // 나무를 만지면 흔적을 볼 수 있어(설명1) } else if (!postingOn && Stage3_Controller._stage3_q11 && closeToTree) { for (int i = 0; i < postings.Length; i++) { postings[i].SetActive(false); controller.trees[i].GetComponent <Stage3_5_tree_coco>().postingOn = false; } posting.SetActive(true); postingOn = true; if (!instructQuest) { ti.currLineArr[2] += 2; // 별감이 다음 대사 ti.NPC_Say_yeah("별감"); // 화살표를 클릭해서 좋아요를 눌러준 친구를 확인하고 너도 좋아요를 눌러주렴 instructQuest = true; } } else if (postingOn && Stage3_Controller._stage3_q11 && closeToTree) { posting.SetActive(false); postingOn = false; } }
void Q16_PosterPuzzle() { if (conv [0] && !textbox_Coco.activeSelf) { ti.NPC_Say_yeah("별감"); conv [0] = false; conv [1] = true; } else if (conv [1] && !textbox_Star.activeSelf) { poster = Instantiate(posterPrefab, Vector3.forward, Quaternion.identity) as GameObject; conv [1] = false; conv [2] = true; } else if (conv [2]) { ti.NPC_Say_yeah("코코"); conv [2] = false; conv [3] = true; } else if (conv [3] && !textbox_Coco.activeSelf) { ti.NPC_Say_yeah("별감"); conv [3] = false; conv [4] = true; } else if (conv [4] && !textbox_Star.activeSelf) { ti.NPC_Say_yeah("코코"); conv [4] = false; conv [5] = true; } }
void Update() { if (portal.GetComponent <Portal_Controller> ().enter_&& !throwing_ball) //throwing ball조건을 해제하면 엄청난 일이 발생한다. { _t_i.NPC_Say_yeah("이본"); first_quest_start = true; portal.SetActive(false); throwing_ball = true; } if (first_quest_start && _t_i.currLineArr [0] == 0) //공을 던진다 { GameObject prefab = (GameObject)Instantiate(Resources.Load("Prefabs/Ball")); prefab.transform.position = _Ivon_Position.position + Vector3.up * 2; first_quest_start = false; // tc.instantiateMessage(0); // 이동 방법 알려주는 메세지 } if (i_c._item_name_list [0] == "공" && Vector2.Distance(player.transform.position, Ivon.transform.position) < 5f && !first_quest_end) //공 줍고 { _t_i.currLineArr[0] += 2; _t_i.NPC_Say_yeah("이본"); i_c._item_name_list [0] = ""; i_c._usable_item [0] = false; i_c._the_number_of_items[0] = 0; first_quest_end = true; } if (!_ivon_textbox.activeSelf && !getGum && first_quest_end && Input.GetMouseButtonDown(0)) { GameObject gum = (GameObject)Instantiate(Resources.Load("Prefabs/dogfood")); gum.name = "개껌"; gum.transform.position = player.transform.position + Vector3.up * 1; getGum = true; tc.instantiateMessage(1); // 개껌을 획득했다! StartCoroutine("changeMessage"); } if (i_c._now_used_item == "개껌" && !second_quest_end) { _t_i.currLineArr[0] += 2; _t_i.NPC_Say_yeah("이본"); portal.SetActive(true); second_quest_end = true; } if (second_quest_end && !_ivon_textbox.activeSelf && !ivon_quest_end) { tc.instantiateMessage(4); // 왼쪽으로 이동하세요 //Debug.Log("이본 대사 끝"); ivon_quest_end = true; GameObject.FindWithTag("NPC").SetActive(false); } }
void Q3_Last() { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); //aa.currLineArr [1] += 2;//별감 다음대사 치게함. if (!a4 && !a5) { StartCoroutine("WhiteOut"); if (ringandstar [0].activeSelf) { ringandstar [0].GetComponent <BoxCollider2D> ().enabled = true; } a5 = true; } if (!a3 && a4 && bbb) { //print ("1"); aa.NPC_Say_yeah("별감"); _star_textbox = GameObject.Find("별감_text"); a3 = true; } if (!a1 && a3 && !_star_textbox.activeSelf) { //print ("2"); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); _coco_textbox = GameObject.Find("코코_text"); a1 = true; } if (!a2 && a1 && !_coco_textbox.activeSelf) { //print ("3"); aa.currLineArr [1] += 2; //별감 다음대사 치게함. aa.NPC_Say_yeah("별감"); a2 = true; } if (a2 && !_star_textbox.activeSelf) { //print ("4"); Stage1_Controller._Stage1_Quest[9] = true; Save_Script.Save_Quest_Info(); } }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Player")) { player.transform.position = this.transform.position; player.GetComponent <SpriteRenderer> ().color = new Color(1, 1, 1, 0); //GetComponent<SpriteRenderer>().color = new Color (1, 1, 1, 1); mbr.enabled = false; //sound 들어가자. aa.currLineArr [1] += 2; aa.NPC_Say_yeah("별감"); _star_textbox = GameObject.Find("별감_text"); a1a1 = true; //ending 시작 } }
void OnMouseDown() { aa = _ti.NPC_Say_yeah(name.Remove(name.Length - 5, 5)); if (!aa) { // transform.parent.gameObject.SetActive(false); // this.gameObject.SetActive(false); if (npc_collider) { npc_collider.enabled = true; } //player_moving.enabled = true; if (name.Remove(name.Length - 5, 5) == "코코") { for (int i = 0; i < _ti._coco_dialogue.Length; i++) { _ti._coco_dialogue [i].SetActive(false); } } } }
void Start() { itemCanvas = GameObject.FindWithTag("Item_Canvas"); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); ti.Import(25); // temp code textbox_Coco = ti._text_boxes [0]; textbox_Star = ti._text_boxes [1]; textbox_Racoon = ti._text_boxes [2]; textbox_Ivon = ti._text_boxes [3]; Stage4_Controller.q [20] = true; // temp code roundBoard = GameObject.Find("Round").GetComponent <Text> (); scoreBoard = GameObject.Find("Score").GetComponent <Text> (); timeBoard = GameObject.Find("Time").GetComponent <Text> (); returnRandom(); tempPos = new Vector3[2]; velocity = new Vector3[2]; for (int i = 0; i < velocity.Length; i++) { velocity [i] = Vector3.zero; } getTempTransform = false; message_mix.SetActive(false); timeBoard.gameObject.SetActive(false); ti.NPC_Say_yeah("너굴맨"); }
void Start() { if (GetComponent <Load_data> ()._where_are_you_from == 12) { player.transform.position = regen_pos.position; } else { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.NPC_Say_yeah("코코"); } if (Stage2_Controller._Stage2_Quest[0]) { // Destroy (a1); // Destroy (b1); //이거 안꺼놓으면 nullreference라서 태엽하고 멀티탭 살아남 Destroy(clockwork); } if (Stage2_Controller._Stage2_Quest[4]) { Destroy(multiTap [0]); Destroy(multiTap [1]); } }
void Q1_say_what_happen() { Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); aa.NPC_Say_yeah("코코"); Stage1_Controller._Stage1_Quest[0] = true; Save_Script.Save_Quest_Info(); }
void OnTriggerEnter2D() { if (!Stage3_Controller._stage3_q2) { ti.NPC_Say_yeah(name); Stage3_Controller._stage3_q2 = true; } //enabled = false; }
void OnMouseDown() { if (EventSystem.current.IsPointerOverGameObject() || //click EventSystem.current.IsPointerOverGameObject(0)) //mobile { return; } aa.NPC_Say_yeah(name); }
void OnTriggerEnter2D() { if (!Stage3_Controller.q[1]) { ti.NPC_Say_yeah(name); Stage3_Controller.q[1] = true; Save_Script.Save_Quest_Info(); } //enabled = false; }
void Update() { if (_now_used_item == "별감" && _now_object_item_used == "Player" && _to_run_once) {//별감이용대화 //대화진행코드 Text_Importer aa = GameObject.FindGameObjectWithTag ("Dialogue").GetComponent<Text_Importer> (); aa.NPC_Say_yeah ("별감"); //stop _to_run_once = false; } }
IEnumerator Backback() { for (int i = 0; i < 30; i++) { mbr.Moving_left(-8f); yield return(null); } Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); aa.NPC_Say_yeah("코코"); mbr.enabled = true; }
void Q3_Talk() { if (a1a1) { //여기에 천둥소리 약하게 하나 넣어야 함. Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); a1a1 = false; Stage2_Controller._Stage2_Quest[2] = true; Save_Script.Save_Quest_Info(); } }
IEnumerator WaitAndSound() { yield return(new WaitForSeconds(2)); leftSound.Play(); Debug.Log("left sound"); yield return(new WaitForSeconds(1)); ti.currLineArr [0] = 8; //코코 대사 ti.NPC_Say_yeah("코코"); yield return(new WaitForSeconds(2)); portal1.GetComponent <BoxCollider2D> ().enabled = true; portal2.GetComponent <BoxCollider2D> ().enabled = true; }
void OnTriggerEnter2D(Collider2D other) //이동포인트에 도착. // if (other.gameObject == player) { // //말하고 뒤로 자동으로 움직임? // mbr.enabled = false; // StartCoroutine ("Backback"); // } { Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사로 넘김 aa.NPC_Say_yeah("코코"); Stage1_Controller._Stage1_Quest[4] = true; Save_Script.Save_Quest_Info(); _coco_textbox = GameObject.Find("코코_text"); }
IEnumerator Backback() { for (int i = 0; i < 30; i++) { mbr.Moving_Right(8f); yield return(null); } Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); int temp = aa.currLineArr [0]; aa.currLineArr [0] = 6; aa.NPC_Say_yeah("코코"); //mbr.enabled = false; aa.currLineArr [0] = temp + 1; //mbr.enabled = true; }
void Q2_remove_partOfmirror() { if (msc.mirror_in_ornot) //거울을 빼면, { Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사로 넘김 aa.NPC_Say_yeah("코코"); transparent_wall.enabled = false; //broken_bridge.SetActive (true); StartCoroutine("Mirror_Effect"); Destroy(GameObject.Find("Mirror_Socket")); Stage1_Controller._Stage1_Quest[2] = true; Save_Script.Save_Quest_Info(); } }
void Q13_TalkToNeogul() { if (!q13_sayonce) { //Debug.Log ("1 sayonce is " + sayonce); q13_sayonce = true; ti.NPC_Say_yeah("너굴맨"); //Debug.Log ("2 sayonce is " + sayonce); } if (!textbox_Racoon.activeSelf) { neogul.SetActive(false); Stage4_Controller.q [13] = true; } // add conversation }
void Q1_StartTalk() { if (!a1) { Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); aa.NPC_Say_yeah("이본"); _ivon_textbox = GameObject.Find("이본_text"); a1 = true; } if (!a2 && a1 && !_ivon_textbox.activeSelf) { Text_Importer aa = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer> (); aa.NPC_Say_yeah("코코"); Stage3_Controller._stage3_q1 = true; } }
void Q4_Talk() { if (a1a1) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); _coco_textbox = GameObject.Find("코코_text"); a1a1 = false; //Stage2_Controller._stage2_q3 = true; } if (!a1a1 && !_coco_textbox.activeSelf) //코코 말 끝내면 { mbr.enabled = false; StartCoroutine("Backback"); Stage2_Controller._Stage2_Quest[3] = true; Save_Script.Save_Quest_Info(); } }
void Q7_find_Remote() { if (a4a4) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); _coco_textbox = GameObject.Find("코코_text"); a4a4 = false; } if (!a4a4 && !_coco_textbox.activeSelf) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [1] += 2; //별감 다음대사 치게함. aa.NPC_Say_yeah("별감"); _remote.enabled = true; Stage2_Controller._Stage2_Quest[10] = true; Save_Script.Save_Quest_Info(); } }
void Q10_Talk_bySpeaker() { if (Input.GetMouseButtonDown(0)) { Vector2 wp = Camera.main.ScreenToWorldPoint(Input.mousePosition); Ray2D ray = new Ray2D(wp, Vector2.zero); RaycastHit2D hit = Physics2D.Raycast(ray.origin, ray.direction); if (hit.collider != null) { if (hit.collider.CompareTag("Audio")) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); Stage2_Controller._Stage2_Quest[14] = true; Save_Script.Save_Quest_Info(); } } } }
void Q2_Talk() { if (a1a1) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); _coco_textbox = GameObject.Find("코코_text"); a1a1 = false; } if (a2a2 && !_coco_textbox.activeSelf) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [1] += 2; //별감 다음대사 치게함. aa.NPC_Say_yeah("별감"); a2a2 = false; Stage2_Controller._Stage2_Quest[1] = true; Save_Script.Save_Quest_Info(); } // ? 다음 집 설명. 끝. }
void Start() { Save_Script.Save_Now_Point(); if (GetComponent <Load_data> ()._where_are_you_from == 26) { player.transform.position = regen_pos.position; } else { ti.NPC_Say_yeah("이본"); } if (Stage4_Controller.q [1]) { Destroy(GameObject.FindWithTag("NPC")); } if (Stage4_Controller.q [13]) { portal2.SetActive(true); } }
IEnumerator FinishGumPuzzle1() { Debug.Log("finish 1"); //animation // if (shakeTimer >= 0) { // Debug.Log ("shake camera"); // Vector2 ShakePos = Random.insideUnitCircle * shakeAmount; // Camera.main.transform.position = new Vector3 (Camera.main.transform.position.x + ShakePos.x, Camera.main.transform.position.y + ShakePos.y, Camera.main.transform.position.z); // shakeTimer -= Time.deltaTime; // yield return null; // } for (float f = 0f; f < 1; f += Time.deltaTime) { Vector2 ShakePos = Random.insideUnitCircle * shakeAmount; Camera.main.transform.position = new Vector3(Camera.main.transform.position.x + ShakePos.x, Camera.main.transform.position.y + ShakePos.y, Camera.main.transform.position.z); yield return(null); } yield return(new WaitForSeconds(0.5f)); ti.NPC_Say_yeah("코코"); q15_1 = false; }
void Q1_pick_clockwork_up() { if (a1a1) { _coco_textbox = GameObject.Find("코코_text"); } if (a2a2 && !_coco_textbox) { clockwork.GetComponent <Collider2D> ().enabled = true; a2a2 = false; a1a1 = false; } //XoX 대사 넘기면 태엽을 줍는다. if (!a2a2) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); Stage2_Controller._Stage2_Quest[0] = true; Save_Script.Save_Quest_Info(); } }
void Q2_start_getaBall() { aa.currLineArr[1] += 2; aa.NPC_Say_yeah(name); Stage3_Controller._stage3_q2 = true; }
void Q6_use_multiTap() { if (!Stage2_Controller._Stage2_Quest[6]) //multi1 사용 { if (_multitap [0].used_or_not_for_retry) { Stage2_Controller._Stage2_Quest[6] = true; Save_Script.Save_Quest_Info(); Destroy(_multitap [0].gameObject); } } if (!Stage2_Controller._Stage2_Quest[7]) //multi2 사용(왼쪽) { if (_multitap [1].used_or_not_for_retry) { Stage2_Controller._Stage2_Quest[7] = true; Save_Script.Save_Quest_Info(); Destroy(_multitap [1].gameObject); } } if (((Stage2_Controller._Stage2_Quest [6] && !Stage2_Controller._Stage2_Quest [7]) || (!Stage2_Controller._Stage2_Quest [6] && Stage2_Controller._Stage2_Quest [7])) && !a5a5) //둘 중 하나만 했을 경우 { _multi_image [3].SetActive(false); _multi_image[0].SetActive(true); a5a5 = true; } if (Stage2_Controller._Stage2_Quest [6] && Stage2_Controller._Stage2_Quest [7] && !a6a6) { _multi_image [3].SetActive(false); _multi_image [0].SetActive(false); _multi_image[1].SetActive(true); a6a6 = true; } if (Stage2_Controller._Stage2_Quest[6] && Stage2_Controller._Stage2_Quest[7] && !Stage2_Controller._Stage2_Quest[8]) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [1] += 2; //별감 다음대사 치게함. aa.NPC_Say_yeah("별감"); Stage2_Controller._Stage2_Quest[8] = true; Save_Script.Save_Quest_Info(); } if (Stage2_Controller._Stage2_Quest[8] && !_mirror_use.enabled) { _mirror_use.enabled = true; } if (_mirror_use.GetComponent <Outline> ().used_or_not_for_retry) { Text_Importer aa = GameObject.FindGameObjectWithTag("Dialogue").GetComponent <Text_Importer> (); aa.currLineArr [0] += 2; //코코 다음대사 치게함. aa.NPC_Say_yeah("코코"); _sparkle.SetActive(true); _multi_image [0].SetActive(false); _multi_image [1].SetActive(false); _multi_image [2].SetActive(true); Stage2_Controller._Stage2_Quest[5] = true; Save_Script.Save_Quest_Info(); } }