//potected 함수들---------------------------------------------------------------------------------- //단서 발견 시 이벤트...클릭 protected void Collect(int num, string name) { Btns_clue[num - 1].GetComponent <Image>().sprite = Sprites_clue[num]; Activation[num - 1] = true; particles_clue_object[num - 1].Play(); SoundManager.Instance.Play_effect(1); if (Disappear_Clue[num - 1]) { target.SetActive(false); } AC.Advice(name); //모든 단서를 찾았다면 if (Activation[0] && Activation[1] && Activation[2]) { //초기화 for (int i = 0; i < 3; i++) { Activation[i] = false; } //다음 명령 내리기 AC.Dialog_and_Advice("play1"); //드래그해야할 단서 표시하기 Effect_clue(particles_clue_btn[0]); //잠금 해제 Enable_drag(true); } }
//Overriding----------------------------------------------------------------------------------- protected override void SetObjectEvent(string name) { switch (name) { case "Npc3_1": if (play) { if (Btns_clue[0].interactable) { StartCoroutine(Game1(true)); } else { AC.Advice("다른 콜록이입니다!"); } } break; case "Npc3_2": if (play) { if (Btns_clue[1].interactable) { StartCoroutine(Game2()); } else { AC.Advice("다른 콜록이입니다!"); } } break; case "Npc3_3": if (play) { if (Btns_clue[2].interactable) { AC.Dialog_and_Advice("play3"); } else { AC.Advice("다른 콜록이입니다!"); } } break; case "Car_red": if (!play && Btns_clue[0].interactable) { car_red.SetActive(false); particles_clue_object[0].Play(); StartCoroutine(Game1(false)); } break; } }
public Texture blank_turtle, blank_netturtle, blank_fish, blank_gfish, blank_plastic; //blank_fish = 물고기, blank_gfish = 째진 물고기 //Overriding----------------------------------------------------------------------------------- protected override void SetObjectEvent(string name) { switch (name) { case "turtle": if (play) { if (Btns_clue[0].interactable) { StartCoroutine(Game1(true)); } //Collect(1, "그물에 묶인 거북이"); else { AC.Advice("다른 NPC입니다!"); } } break; case "Npc2_1": if (play) { if (Btns_clue[1].interactable) { StartCoroutine(Game2()); } //Collect(2, "배가 아픈 뿌직이"); else { AC.Advice("다른 NPC입니다!"); } } break; case "Npc2_2": if (play) { if (Btns_clue[2].interactable) { StartCoroutine(Game3()); } //Collect(3, "물놀이 중인 뿌직이"); else { AC.Advice("다른 NPC입니다!"); } } break; default: SoundManager.Instance.Play_effect(2); //적절하지 않다는 효과음 내기 break; } }
// 단서 버튼 클릭 시 이벤트 진행 public void BE_Clue1() { SoundManager.Instance.Play_effect(0); if (elec_count == 0) { AC.Advice("콜록이의 집에서 문제의 단서를 찾아보세요."); } else { AC.Advice("아직 " + (4 - elec_count) + "개가 남았습니다."); } }
public void BE_Clue3() { SoundManager.Instance.Play_effect(0); if (Btns_clue[1].GetComponent <Image>().sprite.Equals(Sprites_clue[4])) { B_aircap.SetActive(true); Btns_clue[2].GetComponent <Image>().sprite = Sprites_clue[0]; Btns_clue[2].interactable = false; } else { AC.Advice("차례대로 진행해주세요."); } }
void Find_Tissue(int num) { if (count < 0) { return; } plains[num].SetActive(false); particles_clue_object[num].Play(); count++; if (count == 1) { AC.Dialog_and_Advice("play3_2"); } else { AC.Advice("더 찾아주세요!"); } }
//Overriding----------------------------------------------------------------------------------- protected override void SetObjectEvent(string name) { switch (name) { case "Npc1_1": if (play) { if (Btns_clue[0].interactable) { StartCoroutine(Game1(true)); } else { AC.Advice("다른 꼬륵이입니다!"); } } break; case "Npc1_2": if (play) { if (Btns_clue[1].interactable) { StartCoroutine(Game2()); } else { AC.Advice("다른 꼬륵이입니다!"); } } break; case "Npc1_3": if (play) { if (Btns_clue[2].interactable) { StartCoroutine(Game3(true)); } else { AC.Advice("다른 꼬륵이입니다!"); } } break; case "Plane_2": Find_Tissue(0); break; case "Plane_3": Find_Tissue(1); break; case "Plane_4": Find_Tissue(2); break; case "TissueTree": if (count == 3) { tissueTree.SetActive(false); particles_clue_object[3].Play(); StartCoroutine(Game3(false)); } break; } }
public void BE_clue(int num) { string advice = npc[num] + "를 찾아가세요."; AC.Advice(advice); }