private void Start() { moveScript = GetComponent <TutorialTypeMonsterMove>(); ani = GetComponent <Animator>(); ani.SetBool("Bool_Enemy_Waiting", true); }
public override void OnStart() { if (targetTag == null) { targetTag = "Player"; } targetTransform = GameObject.FindGameObjectWithTag(targetTag).transform; target.Value = targetTransform; thisGameObjName.Value = this.gameObject.name; tutorialMoveScript = GetComponent <TutorialTypeMonsterMove>(); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.name == "CloseAttackEnemy01") { CloseAttackTypeNormalColliderCon con = other.GetComponent <CloseAttackTypeNormalColliderCon>(); isSucess = con.isStun; return; } // 튜토리얼용 if ((other.gameObject.name == "TutorialEnemy01(Clone)") && (SceneManager.GetActiveScene().name == "Tutorial_Scene_Ver2") && (forTutorialMonsterCheckOnce == false)) { TutorialManagerVer2 tutorialManagerScript = GameObject.Find("TutorialManagerVer2").GetComponent <TutorialManagerVer2>(); if (tutorialManagerScript.tutorial != TutorialStateVer2.step03_6) { return; } CloseAttackTypeNormalColliderCon con = other.GetComponent <CloseAttackTypeNormalColliderCon>(); isSucess = con.isStun; switch (isSucess) { case true: tutorialManagerScript.tutorial = TutorialStateVer2.step03_7; TutorialTypeMonsterMove tutorialMonsterMoveScript = other.GetComponent <TutorialTypeMonsterMove>(); tutorialMonsterMoveScript.state = TutorialEnemyState.getWait; forTutorialMonsterCheckOnce = true; break; } return; } // 튜토리얼 + 일반 전투용 if ((other.gameObject.name == "TutorialEnemy01(Clone)") && (SceneManager.GetActiveScene().name == "Tutorial_Scene_Ver2")) { CloseAttackTypeNormalColliderCon con = other.GetComponent <CloseAttackTypeNormalColliderCon>(); isSucess = con.isStun; return; } }
void takeTimeForNextLevel() { switch (tutorial) { case TutorialStateVer2.step00: startOnce = false; //¸ØÃç makePlayerWait = MakePlayerWait.wait; tutorial = TutorialStateVer2.step01_1; break; case TutorialStateVer2.step01_1: camCon(0, true); makePlayerWait = MakePlayerWait.play; tutorial = TutorialStateVer2.step01_2; startOnce = false; break; case TutorialStateVer2.step01_2: break; case TutorialStateVer2.step01_3: uiSet[1].SetActive(true); typingUiSet[0].SetActive(true); typingTextConScript.typingTextStart(textCount); tutorial = TutorialStateVer2.step01_3_1; break; case TutorialStateVer2.step01_4: camCon(1, true); startOnce = false; tutorial = TutorialStateVer2.step02_1; break; case TutorialStateVer2.step03_4: TutorialTypeMonsterMove tutorialMoveScript = GameObject.Find("TutorialEnemy01(Clone)").GetComponent <TutorialTypeMonsterMove>(); tutorialMoveScript.state = TutorialEnemyState.getWait; tutorial = TutorialStateVer2.step03_5; startOnce = false; break; } }
public override void OnStart() { tutorialMoveScript = GetComponent <TutorialTypeMonsterMove>(); }
private void Update() { if (SceneManager.GetActiveScene().name != "Tutorial_Scene_Ver2") { return; } Debug.Log(tutorial); if ((playerGetWeaponUINo5Script.bgUiNo5Obj.activeInHierarchy == true) && (tutorial == TutorialStateVer2.step04_1)) { tutorial = TutorialStateVer2.step04_2; } if ((playerGetWeaponUINo5Script.bgUiNo5Obj.activeInHierarchy == false) && (tutorial == TutorialStateVer2.step04_2_1)) { tutorial = TutorialStateVer2.step04_3; } if ((playerPowerGetUiNo2Script.bgUiNo2Obj.activeInHierarchy == false) && (tutorial == TutorialStateVer2.step05_2)) { tutorial = TutorialStateVer2.step05_3; } switch (tutorial) { case TutorialStateVer2.step00: if (((Input.GetKeyDown(KeyCode.W)) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D)) && startOnce == false) { startOnce = true; StopAllCoroutines(); uiSet[4].SetActive(false); //¿òÁ÷¿© makePlayerWait = MakePlayerWait.play; for (int i = 0; i < 4; i++) { wsadButtonAni[i].SetBool("Start", false); } } if (Input.GetKey(KeyCode.W) && (startOnce == true)) { wsadButtonAni[0].SetTrigger("StartButton"); } if (Input.GetKey(KeyCode.A) && (startOnce == true)) { wsadButtonAni[1].SetTrigger("StartButton"); } if (Input.GetKey(KeyCode.S) && (startOnce == true)) { wsadButtonAni[2].SetTrigger("StartButton"); } if (Input.GetKey(KeyCode.D) && (startOnce == true)) { wsadButtonAni[3].SetTrigger("StartButton"); } if (Input.GetKeyUp(KeyCode.W) && (startOnce == true)) { uiSet[5].SetActive(false); stage00Check[0] = true; wsadButtonAni[0].SetBool("Start", false); } if (Input.GetKeyUp(KeyCode.A) && (startOnce == true)) { uiSet[6].SetActive(false); stage00Check[1] = true; wsadButtonAni[1].SetBool("Start", false); } if (Input.GetKeyUp(KeyCode.S) && (startOnce == true)) { uiSet[7].SetActive(false); stage00Check[2] = true; wsadButtonAni[2].SetBool("Start", false); } if (Input.GetKeyUp(KeyCode.D) && (startOnce == true)) { uiSet[8].SetActive(false); stage00Check[3] = true; wsadButtonAni[3].SetBool("Start", false); } if (stage00Check[0] && stage00Check[1] && stage00Check[2] && stage00Check[3]) { uiSet[0].SetActive(false); takeTimeForNextLevel(); } break; case TutorialStateVer2.step01_1: if (startOnce == false) { startOnce = true; camCon(0); Invoke("takeTimeForNextLevel", 3f); } break; case TutorialStateVer2.step01_2: break; case TutorialStateVer2.step01_3: if (startOnce == false) { startOnce = true; camCon(0); //¸ØÃç makePlayerWait = MakePlayerWait.wait; ingameUISet[0].SetActive(false); ingameUISet[1].SetActive(false); StartCoroutine("ButtonAni"); Invoke("takeTimeForNextLevel", 2f); } break; // 1¹ø¤Š ¹®ÀÌ ¿¸² case TutorialStateVer2.step01_3_1: if (typingTextConScript.textState == TextState.textStart) { return; } if ((Input.GetKeyDown(KeyCode.Space))) { switch (textCount) { case 1: startOnce = false; StopAllCoroutines(); //Ä· Á¶Àý camCon(0, true); camCon(1); //¹® ¿·Á! doorAni[0].SetTrigger("OpenDoor"); tutorial = TutorialStateVer2.step01_4; return; } textCount++; typingTextConScript.typingTextStart(textCount); } break; case TutorialStateVer2.step01_4: uiSet[1].SetActive(false); typingUiSet[0].SetActive(false); Invoke("takeTimeForNextLevel", 3f); break; case TutorialStateVer2.step02_1: if (startOnce == false) { startOnce = true; //¿òÁ÷¿©! makePlayerWait = MakePlayerWait.play; // ÀΰÔÀÓ ui ȸé Á¶Àý ingameUISet[0].SetActive(true); } break; case TutorialStateVer2.step02_2: if (startOnce == false) { startOnce = true; //¹® ´Ý¾Æ! doorAni[0].SetBool("Start", true); //¸ØÃç makePlayerWait = MakePlayerWait.wait; typingUiSet[0].SetActive(true); StartCoroutine("ButtonAni"); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { if (detailTextCount >= 7) { StopAllCoroutines(); uiSet[2].SetActive(false); forIngameUiTutorial[detailTextCount - 1].SetActive(false); startOnce = false; tutorial = TutorialStateVer2.step02_3; } else { typingUiSet[0].SetActive(false); uiSet[2].SetActive(true); if (detailTextCount != 0) { forIngameUiTutorial[detailTextCount - 1].SetActive(false); } forIngameUiTutorial[detailTextCount].SetActive(true); typingTextConScript.tutorialDetail(detailTextCount); detailTextCount++; } } break; case TutorialStateVer2.step02_3: if (startOnce == false) { StartCoroutine("ButtonAni"); startOnce = true; typingUiSet[0].SetActive(true); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { StopAllCoroutines(); startOnce = false; typingUiSet[0].SetActive(false); tutorial = TutorialStateVer2.step03_1; } break; //¸ðÀÇ ÀüÅõ ½ÃÀÛ! // ‹š·ÁºÁ! case TutorialStateVer2.step03_1: if (startOnce == false) { startOnce = true; Instantiate(tutorialMonster, tutorialMonsterSpwanPos); StartCoroutine("ButtonAni"); typingUiSet[0].SetActive(true); typingUiSet[2].SetActive(true); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { startOnce = false; //¿òÁ÷¿© makePlayerWait = MakePlayerWait.play; StopAllCoroutines(); typingUiSet[0].SetActive(false); typingUiSet[2].SetActive(false); tutorial = TutorialStateVer2.step03_2; } break; case TutorialStateVer2.step03_2: break; // À¸¾Ç ¸Â¾Ò¾î! case TutorialStateVer2.step03_3: if (startOnce == false) { //¸ØÃç makePlayerWait = MakePlayerWait.wait; startOnce = true; buttonAniNum = 4; StartCoroutine("ButtonAni"); typingUiSet[0].SetActive(true); typingUiSet[1].SetActive(true); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { startOnce = false; StopAllCoroutines(); typingUiSet[0].SetActive(false); typingUiSet[1].SetActive(false); TutorialTypeMonsterMove tutorialMoveScript = GameObject.Find("TutorialEnemy01(Clone)").GetComponent <TutorialTypeMonsterMove>(); tutorialMoveScript.state = TutorialEnemyState.getPlayerDogged; tutorial = TutorialStateVer2.step03_4; makePlayerWait = MakePlayerWait.play; } break; // ÀÌÁ¦ ±¸¸£±â ½ÃÀÛ! case TutorialStateVer2.step03_4: if (Input.GetKeyDown(KeyCode.Space) && Input.GetKey(KeyCode.A) && startOnce == false) { startOnce = true; Invoke("takeTimeForNextLevel", 0.5f); } else if (Input.GetKeyDown(KeyCode.Space) && Input.GetKey(KeyCode.D) && startOnce == false) { startOnce = true; Invoke("takeTimeForNextLevel", 0.5f); } else if (Input.GetKeyDown(KeyCode.Space) && Input.GetKey(KeyCode.S) && startOnce == false) { startOnce = true; Invoke("takeTimeForNextLevel", 0.5f); } else if (Input.GetKeyDown(KeyCode.Space) && Input.GetKey(KeyCode.W) && startOnce == false) { startOnce = true; Invoke("takeTimeForNextLevel", 0.5f); } break; // ±¸¸£±â ¼º°ø ! Æиµ ÇؾßÇØ! case TutorialStateVer2.step03_5: if (startOnce == false) { //¸ØÃç makePlayerWait = MakePlayerWait.wait; startOnce = true; buttonAniNum = 4; StartCoroutine("ButtonAni"); typingUiSet[0].SetActive(true); typingUiSet[3].SetActive(true); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { startOnce = false; StopAllCoroutines(); typingUiSet[0].SetActive(false); typingUiSet[3].SetActive(false); TutorialTypeMonsterMove tutorialMoveScript = GameObject.Find("TutorialEnemy01(Clone)").GetComponent <TutorialTypeMonsterMove>(); tutorialMoveScript.state = TutorialEnemyState.getParring; tutorial = TutorialStateVer2.step03_6; makePlayerWait = MakePlayerWait.play; } break; // ÆиµÁß case TutorialStateVer2.step03_6: break; // ÀÌÁ¦ Á×´Â ¸ð½ÀÀ» º¸¿©ÁÙ²¨¾ß case TutorialStateVer2.step03_7: if (startOnce == false) { TutorialTypeMonsterMove tutorialMoveScript = GameObject.Find("TutorialEnemy01(Clone)").GetComponent <TutorialTypeMonsterMove>(); tutorialMoveScript.state = TutorialEnemyState.getWait; //¸ØÃç makePlayerWait = MakePlayerWait.wait; startOnce = true; StartCoroutine("ButtonAni"); typingUiSet[0].SetActive(true); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { startOnce = false; StopAllCoroutines(); typingUiSet[0].SetActive(false); TutorialTypeMonsterMove tutorialMoveScript = GameObject.Find("TutorialEnemy01(Clone)").GetComponent <TutorialTypeMonsterMove>(); tutorialMoveScript.state = TutorialEnemyState.getAfterDead; tutorial = TutorialStateVer2.step03_8; makePlayerWait = MakePlayerWait.play; } break; // ½Î¿ö! case TutorialStateVer2.step03_8: break; // Á×¾ú¾î! ¹«±â¸¦ ¸Ô¾î! case TutorialStateVer2.step03_9: if (startOnce == false) { startOnce = true; //¸ØÃç makePlayerWait = MakePlayerWait.wait; StartCoroutine("ButtonAni"); typingUiSet[0].SetActive(true); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { startOnce = false; StopAllCoroutines(); typingUiSet[0].SetActive(false); makePlayerWait = MakePlayerWait.play; tutorial = TutorialStateVer2.step04_1; } break; // ¹«±â¿¡°Ô ´Ù°¡°¡±â±îÁö ±â´Þ¸² case TutorialStateVer2.step04_1: break; // ¹«±â °ü·Ã ¼³¸í ui on! case TutorialStateVer2.step04_2: if (startOnce == false) { startOnce = true; //¸ØÃç makePlayerWait = MakePlayerWait.wait; uiSet[2].SetActive(true); forIngameUiTutorial[detailTextCount].SetActive(true); typingTextConScript.tutorialDetail(detailTextCount); detailTextCount++; } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { if (detailTextCount >= 11) { StopAllCoroutines(); forIngameUiTutorial[detailTextCount - 1].SetActive(false); startOnce = false; uiSet[2].SetActive(false); tutorial = TutorialStateVer2.step04_2_1; } else { if (detailTextCount != 0) { forIngameUiTutorial[detailTextCount - 1].SetActive(false); } forIngameUiTutorial[detailTextCount].SetActive(true); typingTextConScript.tutorialDetail(detailTextCount); detailTextCount++; } } break; // Àá½Ã ±â´Þ¸² + ¹«±ââ UI¸¦ ³»¸®¸é UPDATE¿¡¼ ó¸®ÇÔ case TutorialStateVer2.step04_2_1: break; // i¸¦ ´·¯ºÁ¶ó°í ¼³¸íÇÔ case TutorialStateVer2.step04_3: if (startOnce == false) { startOnce = true; //¸ØÃç makePlayerWait = MakePlayerWait.wait; typingUiSet[0].SetActive(true); typingUiSet[4].SetActive(true); StartCoroutine("ButtonAni"); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { startOnce = false; StopAllCoroutines(); typingUiSet[0].SetActive(false); typingUiSet[4].SetActive(false); makePlayerWait = MakePlayerWait.play; tutorial = TutorialStateVer2.step04_4; } break; // i¸¦ ´©¸¦°æ¿ì case TutorialStateVer2.step04_4: if (Input.GetKeyDown(KeyCode.I) && startOnce == false) { startOnce = true; //¿òÁ÷¿©! makePlayerWait = MakePlayerWait.play; } if (Input.GetKeyDown(KeyCode.Escape) && startOnce == true) { startOnce = false; tutorial = TutorialStateVer2.step04_5; } break; // ÀÌÁ¦ ¼®»ó¿¡ ´ëÇØ ¾Ë·ÁÁÜ case TutorialStateVer2.step04_5: if (startOnce == false) { startOnce = true; //¸ØÃç makePlayerWait = MakePlayerWait.wait; StartCoroutine("ButtonAni"); typingUiSet[0].SetActive(true); textCount++; typingTextConScript.typingTextStart(textCount); } if (typingTextConScript.textState == TextState.textStart) { return; } if (Input.GetKeyDown(KeyCode.Space)) { startOnce = false; //¹® ¿¾î! doorAni[1].SetBool("openDoor", true); //¸ØÃç makePlayerWait = MakePlayerWait.play; StopAllCoroutines(); typingUiSet[0].SetActive(false); tutorial = TutorialStateVer2.step05_1; } break; // case TutorialStateVer2.step05_1: if (startOnce == false) { makePlayerWait = MakePlayerWait.play; } startOnce = true; if (playerPowerGetUiNo2Script.bgUiNo2Obj.activeInHierarchy == true) { startOnce = false; tutorial = TutorialStateVer2.step05_2; } break; case TutorialStateVer2.step05_2: //¸ØÃç makePlayerWait = MakePlayerWait.wait; break; //Æ©Å丮¾ó ³¡ case TutorialStateVer2.step05_3: if (startOnce == false) { startOnce = true; //¿òÁ÷¿© makePlayerWait = MakePlayerWait.play; //¹® ¿¾î! doorAni[2].SetBool("openDoor", true); } break; } }