// void OnMouseDown() // { // if (!Stage3_Controller.q[14]) // { // Stage3_Controller.q[14] = true; // Save_Script.Save_Quest_Info (); // ti.NPC_Say_yeah("별감"); // 나무를 만지면 흔적을 볼 수 있어(설명1) // } else if (!postingOn && Stage3_Controller.q[14] && 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.q[14] && closeToTree) // { // posting.SetActive(false); // postingOn = false; // } // } void OnMouseDown() { if (!instructQuest[0]) { print("SDDF"); instructQuest[0] = true; ti.Talk(); // 나무를 만지면 흔적을 볼 수 있어(설명1) } else if (!postingOn && instructQuest[0] && 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[1]) { ti.Talk(3); // 화살표를 클릭해서 좋아요를 눌러준 친구를 확인하고 너도 좋아요를 눌러주렴 instructQuest[1] = true; } } else if (postingOn && instructQuest[0] && closeToTree) { posting.SetActive(false); postingOn = false; } }
IEnumerator ChangeImage() { //player.GetComponent<Moving_by_RLbuttons> ().enabled = false; //controller.playerPos = player.transform.position; for (float a = 0f; a < 1f; a += Time.deltaTime) { Color c = fade.color; c.a = 1 - a; Debug.Log(c); fade.color = c; yield return(null); } otherman.SetActive(true); //this.gameObject.SetActive (false); ti.Talk(ti.lineNo + 2); //need animation effect //pos = this.transform.position; //controller.pos = pos; //yield return new WaitForSeconds(1); //player.GetComponent<Rigidbody2D> ().gravityScale = 0; //controller.movePlayer = true; //Stage4_Controller.q [16] = true; yield return(null); }
void Start() { if (Stage4_Controller.sceneIndex > SceneManager.GetActiveScene().buildIndex) { player.transform.position = regen_pos.position; } else { player.transform.position = start_pos.position; } Stage4_Controller.sceneIndex = SceneManager.GetActiveScene().buildIndex; ti.Import(sceneNo); //Save_Script.Save_Now_Point(); if (!Stage4_Controller.q [0]) { ti.Talk(); } else if (Stage4_Controller.q [0]) { Destroy(GameObject.FindWithTag("NPC")); } if (Stage4_Controller.q [10]) { Light.SetActive(false); } if (Stage4_Controller.q [17]) { portal2.SetActive(true); } }
void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player") && Stage6_Controller.q[8] && !Stage6_Controller.q[9]) { ti.Talk(); talkTrigger.enabled = false; sceneTrigger.enabled = true; } else if (other.CompareTag("Player") && Stage6_Controller.q[10] && !Stage6_Controller.q[11]) { mbr.enabled = false; StartCoroutine(Fadeout_black()); } else if (other.CompareTag("Player") && Stage6_Controller.q[17] && !Stage6_Controller.q[18]) { ti.Talk(10); talkTrigger.enabled = false; ic._interaction_object[2] = "NPC"; } else if (other.CompareTag("Player") && Stage6_Controller.q[21] && !Stage6_Controller.q[22]) { mbr.enabled = false; StartCoroutine(Fadeout_black()); } }
void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player") && Stage6_Controller.q[39] && !Stage6_Controller.q[40]) { ti.Talk(11); // 호오 너희는? } }
void Q1_Move_Baby() { if (!q1a1) { Save_Script.Save_Now_Point(); ti.Talk(); // 코코야 저기 봐 강아지가 q1a1 = true; } else if (!Stage5_Controller.q[77]) { mbr.enabled = false; } else if (Stage5_Controller.q[77] && !q1a2) { mbr.Moving_Right(8f); if (babyDog.transform.position.x <= player.transform.position.x) { babyDog.transform.position = new Vector2(player.transform.position.x, this.transform.position.y); } if (player.transform.position.x >= 13f) { q1a2 = true; } } else if (q1a2 && !q1a3) { ti.Talk(3); // 어떡해 감기걸리겟어 q1a3 = true; } }
void Q2_removed_manhole() { if (!q2a1) { ti.Talk(11); //음? q2a1 = true; } else if (!Stage5_Controller.q[69]) { mbr.enabled = false; } else if (Stage5_Controller.q[69] && !q2a3) // 중간 지점까지 카메라 훑어주기 { StartCoroutine(Right_Camera_Move()); q2a4 = true; } else if (q2a3 && q2a4 && !q2a5) { StartCoroutine(Left_Camera_Move()); q2a6 = true; } else if (q2a5 && q2a6 && !q2a7) { main_Camera.GetComponent <CameraManager>().enabled = true; ti.Talk(14); // 원래 이랬나.. q2a7 = true; } }
void OnTriggerEnter2D() { if (!Stage4_Controller.q[19]) { ti.Talk(); } }
void Q2_Talk() { if (a1a1) { ti.Talk(); a1a1 = false; } }
void OnTriggerEnter2D() { if (!Stage4_Controller.q [30]) { ti.Talk(ti.lineNo + 2); //conversation GetComponent <BoxCollider2D>().enabled = false; } }
void Start() { mbr = player.GetComponent <Moving_by_RLbuttons>(); Save_Script.Save_Now_Point(); ti.Talk(); // 코코~ mbr.enabled = false; player.transform.position = startpos.position; }
void OnTriggerEnter2D() { if (Stage4_Controller.q [23] && !Stage4_Controller.q [24]) { ti.Talk(ti.lineNo + 2); } else { ti.Talk(); } }
void Q3_Talk() { if (a1a1) { //여기에 천둥소리 약하게 하나 넣어야 함. _2_3_thunder.Play(); ti.Talk(); a1a1 = false; Stage2_Controller.q[2] = true; } }
void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player") && Stage4_Controller.q [9] && !Stage4_Controller.q [10]) { ti.Talk(); } }
void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player") && Stage4_Controller.q[16] && !Stage4_Controller.q[17]) { ti.Talk(ti.lineNo + 2); } }
void OnMouseDown() { if (transform.parent.gameObject.name == "Coco_text") { for (int i = 0; i < ti.cocoDialogue.Length; i++) { ti.cocoDialogue [i].SetActive(false); } } transform.parent.gameObject.SetActive(false); aa = ti.Talk(); if (!aa) { if (transform.parent.gameObject.name == "Coco_text") { for (int i = 0; i < ti.cocoDialogue.Length; i++) { ti.cocoDialogue [i].SetActive(false); } } transform.parent.gameObject.SetActive(false); } }
void Q1_pick_clockwork_up() { if (a1a1) { ti.Talk(1); a1a1 = false; } if (!a1a1 && Stage2_Controller.q[28]) { clockwork.GetComponent <Collider2D> ().enabled = true; ti.Talk(3); Stage2_Controller.q[0] = true; } //XoX 대사 넘기면 태엽을 줍는다. }
void Update() { if (Stage6_Controller.q[0] && !Stage6_Controller.q[1]) { mbr.enabled = false; if (rainIntensity.RainIntensity < 1f) { rainIntensity.RainIntensity += 0.005f; } else { Stage6_Controller.q[1] = true; } } else if (Stage6_Controller.q[1] && !Stage6_Controller.q[2]) { if (!q1a1) { ti.Talk(11); q1a1 = true; } } else if (Stage6_Controller.q[2] && !Stage6_Controller.q[3]) {// 나무 밑으로 뛰어가기 Ivon.SetActive(false); /*mbr.Moving_Right(8f); * _Ivon_Position.position = new Vector2(_Ivon_Position.position.x + 0.1f, _Ivon_Position.position.y);*/ } }
void Q1_StartTalk() { if (!a1) { ti.Talk(); //_ivon_textbox = GameObject.Find ("이본_text"); a1 = true; } }
void Q2_After_Seven_Trash() { if (!q2a1) { hardBox.SetActive(true); Physics2D.IgnoreCollision(hardBox.GetComponent <BoxCollider2D>(), trashHeap.GetComponent <PolygonCollider2D>()); print("박스에 시그널 보내"); if (ic._item_name_list[3] == "HardBox") { portalTo5_3.enabled = false; ti.Talk();//아 상자는 왜 또 q2a1 = true; } } else if (!Stage5_Controller.q[75]) { mbr.enabled = false; } else if (Stage5_Controller.q[75] && !q2a4) { StartCoroutine(Fadeout_black()); q2a4 = true; } else if (q2a4 && q2a5 && !q2a6) { StartCoroutine(Fadein_Image()); q2a6 = true; } else if (q2a6 && q2a7 && !q2a8) { StartCoroutine(Fadeout_Image()); q2a8 = true; } else if (q2a8 && q2a9 && !q2a10) { StartCoroutine(Fadein_black()); q2a10 = true; } else if (q2a10 && q2a11 && !q2a12) { Stage5_Controller.q[42] = true; // 회상 씬에서 돌아오는 거까지 완료. } }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); start_pos = GameObject.Find("Start_Pos"); dragging = diary.GetComponent <BookPro>(); ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); ti.Import(61); on_off = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(0).gameObject; itemButton0 = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(1).GetChild(0).GetComponent <Image>(); item0 = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(1).GetChild(0).GetChild(0).GetComponent <Image>(); itemButton1 = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(1).GetChild(1).GetComponent <Image>(); item1 = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(1).GetChild(1).GetChild(1).GetComponent <Image>(); itemButton2 = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(1).GetChild(2).GetComponent <Image>(); itemButton3 = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(1).GetChild(3).GetComponent <Image>(); itemButton4 = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(0).GetChild(1).GetChild(4).GetComponent <Image>(); joystick = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(3).gameObject; jumpButton = GameObject.FindGameObjectWithTag("Item_Canvas").transform.GetChild(1).gameObject; on_off.SetActive(false); joystick.SetActive(false); jumpButton.SetActive(false); itemButton0.enabled = false; item0.enabled = false; itemButton1.enabled = false; item1.enabled = false; itemButton2.enabled = false; itemButton3.enabled = false; itemButton4.enabled = false; player.transform.position = start_pos.transform.position; if (!Stage6_Controller.q[15]) { ti.Talk(); } else if (!Stage6_Controller.q[25]) { ti.Talk(4); // 음 여긴 없는걸 } else if (!Stage6_Controller.q[35]) { dragging.CurrentPaper = 5; } else if (!Stage6_Controller.q[42]) { dragging.CurrentPaper = 3; ti.Talk(10); // 여기서 갑자기 왜 일기장을..? } }
void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.CompareTag("Player")) { if (Stage4_Controller.q [5] && !Stage4_Controller.q [6]) { ti.Talk(11); portaltoleft.SetActive(true); } else if (Stage4_Controller.q [8] && !Stage4_Controller.q [9]) { Debug.Log("coco animation digging " + ti.lineNo); ti.Talk(18); } else if (Stage4_Controller.q [13] && !Stage4_Controller.q [14]) { Q14_SleepAndWake(); } } }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); mbr = player.GetComponent <Moving_by_RLbuttons>(); start_pos = GameObject.Find("Start_Pos").transform; ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); player.transform.position = start_pos.position; ti.Import(63); ti.Talk(); // 어서와 코코 }
void Q1_conversation() { if (!q1a1) { //save point// Save_Script.Save_Now_Point(); //save point// ti.Talk(); q1a1 = true; } mbr.enabled = false; }
void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.tag == "Player") { if (ic.Get_Item_Auto(19, GetComponent <SpriteRenderer>().sprite)) { Stage4_Controller.q32 [0] = true; ti.Talk(ti.lineNo + 2); Destroy(this.gameObject); } } }
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"); ti.Talk(); a1a1 = false; //말 끝나고 27 트루로 함. 26까지가 기존. 27부터 새로 추가, 수정 //Stage2_Controller._stage2_q3 = true; } if (!a1a1 && Stage2_Controller.q[27]) //코코 말 끝내면 { mbr.enabled = false; StartCoroutine("Backback"); Stage2_Controller.q[3] = true; } }
void Q1_Find_Trash_Ani() { if (!q1a1) { ti.Talk(); // 엇 저 인형은.. q1a1 = true; } else if (!Stage5_Controller.q[70]) { mbr.enabled = false; } else if (Stage5_Controller.q[70] && !q1a2) { mbr.Moving_Right(8f); if (player.transform.position.x >= -6.5f) { q1a2 = true; } //StartCoroutine(MoveToTrash()); //q1a5 = true; } else if (q1a2) { Stage5_Controller.q[36] = true; } }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject == player) { //말하고 뒤로 자동으로 움직임? mbr.enabled = false; mbr.SetState(CocoState.Fear); // Text_Importer aa = GameObject.FindWithTag ("Dialogue").GetComponent<Text_Importer> (); // aa.NPC_Say_yeah ("코코"); ti.Talk(); // StartCoroutine ("Backback"); } }
void Start() { ti = GameObject.FindWithTag("Dialogue").GetComponent <Text_Importer2>(); ti.Import(44); player = GameObject.FindWithTag("Player"); player.transform.position = startPos.position; item_Canvas = GameObject.FindWithTag("Item_Canvas"); ti.Talk(); Save_Script.Save_Now_Point(); }
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(); }