private void Update() { if (controller.m_changeLevel.triggered) { SceneManager_JamieG.Instance.LoadNextLevel(); } switch (currentLevel) { case 1: { if (!keyUsed) { if (!keyTrigger.activeInHierarchy) { wpnUI.setKey(false); Debug.Log("key worked"); walls2.SetTile(new Vector3Int(6, 13, 0), null); walls2.SetTile(new Vector3Int(5, 13, 0), null); walls2.SetTile(new Vector3Int(4, 13, 0), null); walls1.SetTile(new Vector3Int(3, 12, 0), null); walls1.SetTile(new Vector3Int(4, 12, 0), null); walls1.SetTile(new Vector3Int(5, 12, 0), null); keyUsed = true; } } } break; case 2: { if (!enemyDead) { if (level2Enemy1.m_health <= 0 || level2Enemy2.m_health <= 0) { levelLiftTrigger.SetActive(true); level2End.TriggerDialogue(0); enemyDead = true; } } } break; case 3: { if (!bossDead) { if (!levelBossIntro) { // cinematics.PlayZoomIn(); bossDialogue.TriggerDialogue(0); levelBossIntro = true; } if (boss.m_health <= 0) { //dramatic death SE //freeze on enemy as he dies bossDialogue.TriggerDialogue(1); levelLiftTrigger.SetActive(true); bossDead = true; } } } break; case 4: { if (!keyUsed) { if (!keyTrigger.activeInHierarchy) { wpnUI.setKey(false); keyUsed = true; walls2.SetTile(new Vector3Int(25, 11, 0), null); walls2.SetTile(new Vector3Int(25, 10, 0), null); walls2.SetTile(new Vector3Int(25, 9, 0), null); walls1.SetTile(new Vector3Int(24, 9, 0), null); walls1.SetTile(new Vector3Int(24, 10, 0), null); walls1.SetTile(new Vector3Int(24, 8, 0), null); } } } break; case 5: { if (!keyUsed) { if (!keyTrigger.activeInHierarchy) { wpnUI.setKey(false); keyUsed = true; levelLiftTrigger.SetActive(true); } } if (!vents.activeInHierarchy && !endVentDialogue.activeInHierarchy) { endVentDialogue.SetActive(true); } //if(endVentDialogueCanPlay) //{ // endVentDialogue.SetActive(true); // endVentDialogueCanPlay = false; //} } break; case 6: { if (!bossDead) { if (!levelBossIntro) { bossDialogue.TriggerDialogue(0); levelBossIntro = true; } if (boss.m_health <= 0) { //dramatic death SE //freeze on enemy as he dies bossDialogue.TriggerDialogue(1); levelLiftTrigger.SetActive(true); bossDead = true; } } if (!drawFreezer) { walls2.SetTile(new Vector3Int(23, 10, 0), null); walls2.SetTile(new Vector3Int(23, 9, 0), null); walls2.SetTile(new Vector3Int(23, 8, 0), null); walls1.SetTile(new Vector3Int(22, 7, 0), null); walls1.SetTile(new Vector3Int(22, 8, 0), null); walls1.SetTile(new Vector3Int(22, 9, 0), null); } else if (drawFreezer) { walls2.SetTile(new Vector3Int(23, 10, 0), topDoorTile); walls2.SetTile(new Vector3Int(23, 9, 0), topDoorTile); walls2.SetTile(new Vector3Int(23, 8, 0), topDoorTile); walls1.SetTile(new Vector3Int(22, 7, 0), bottomDoorTile); walls1.SetTile(new Vector3Int(22, 8, 0), bottomDoorTile); walls1.SetTile(new Vector3Int(22, 9, 0), bottomDoorTile); } } break; case 7: { if (!keyTrigger.activeInHierarchy && !keyUsed) { levelLiftTrigger.SetActive(true); keyUsed = true; } } break; case 8: { if (!keyUsed) { if (!keyTrigger.activeInHierarchy) { walls2.SetTile(new Vector3Int(22, 28, 0), null); walls2.SetTile(new Vector3Int(22, 29, 0), null); walls2.SetTile(new Vector3Int(22, 27, 0), null); walls1.SetTile(new Vector3Int(21, 27, 0), null); walls1.SetTile(new Vector3Int(21, 28, 0), null); walls1.SetTile(new Vector3Int(21, 26, 0), null); } if (!keyTriggerTwo.activeInHierarchy) { walls2.SetTile(new Vector3Int(29, 10, 0), null); walls2.SetTile(new Vector3Int(29, 11, 0), null); walls2.SetTile(new Vector3Int(29, 9, 0), null); walls1.SetTile(new Vector3Int(28, 9, 0), null); walls1.SetTile(new Vector3Int(28, 10, 0), null); walls1.SetTile(new Vector3Int(28, 8, 0), null); } } } break; case 9: { if (!bossDead) { if (!levelBossIntro) { bossDialogue.TriggerDialogue(0); levelBossIntro = true; } if (boss.m_health <= 0) { //dramatic death SE //freeze on enemy as he dies bossDialogue.TriggerDialogue(1); levelLiftTrigger.SetActive(true); bossDead = true; } } } break; case 11: { if (!keyUsed) { if (!keyTrigger.activeInHierarchy) { wpnUI.setKey(false); keyUsed = true; //door top walls2.SetTile(new Vector3Int(36, 32, 0), null); walls2.SetTile(new Vector3Int(37, 32, 0), null); walls2.SetTile(new Vector3Int(38, 32, 0), null); walls1.SetTile(new Vector3Int(35, 31, 0), null); walls1.SetTile(new Vector3Int(36, 31, 0), null); walls1.SetTile(new Vector3Int(37, 31, 0), null); //door mid-right walls2.SetTile(new Vector3Int(33, 19, 0), null); walls2.SetTile(new Vector3Int(33, 18, 0), null); walls2.SetTile(new Vector3Int(33, 17, 0), null); walls1.SetTile(new Vector3Int(32, 18, 0), null); walls1.SetTile(new Vector3Int(32, 17, 0), null); walls1.SetTile(new Vector3Int(32, 16, 0), null); //door right walls2.SetTile(new Vector3Int(35, 31, 0), null); walls2.SetTile(new Vector3Int(36, 31, 0), null); walls2.SetTile(new Vector3Int(37, 31, 0), null); walls1.SetTile(new Vector3Int(38, 10, 0), null); walls1.SetTile(new Vector3Int(37, 10, 0), null); walls1.SetTile(new Vector3Int(36, 10, 0), null); //door left walls2.SetTile(new Vector3Int(11, 26, 0), null); walls2.SetTile(new Vector3Int(12, 26, 0), null); walls2.SetTile(new Vector3Int(13, 26, 0), null); walls1.SetTile(new Vector3Int(10, 25, 0), null); walls1.SetTile(new Vector3Int(11, 25, 0), null); walls1.SetTile(new Vector3Int(12, 25, 0), null); } } } break; case 12: { if (!bossDead) { if (!levelBossIntro) { cinematicDone = false; cinematics.PlayZoomIn(); bossDialogue.TriggerDialogue(0); cinematicsTimer++; if (cinematicsTimer >= 2.0f) { cinematics.PlayZoomOut(); levelBossIntro = true; cinematicDone = true; } } if (boss.m_health <= 0) { cinematics.PlayZoomIn(); bossDialogue.TriggerDialogue(1); levelLiftTrigger.SetActive(true); bossDead = true; } } } break; case 13: { if (!keyUsed) { if (!keyTrigger.activeInHierarchy) { wpnUI.setKey(false); //door top walls2.SetTile(new Vector3Int(33, 17, 0), null); walls2.SetTile(new Vector3Int(34, 17, 0), null); walls2.SetTile(new Vector3Int(35, 17, 0), null); walls1.SetTile(new Vector3Int(34, 16, 0), null); walls1.SetTile(new Vector3Int(33, 16, 0), null); walls1.SetTile(new Vector3Int(32, 16, 0), null); keyUsed = true; } } } break; case 14: { if (!keyTrigger.activeInHierarchy) { levelLiftTrigger.SetActive(true); wpnUI.setKey(false); } } break; case 15: { if (!bossDead) { if (!levelBossIntro) { bossDialogue.TriggerDialogue(0); levelBossIntro = true; } if (boss.m_health <= 0) { //dramatic death SE //freeze on enemy as he dies bossDialogue.TriggerDialogue(1); levelLiftTrigger.SetActive(true); bossDead = true; } } } break; case 16: { //if (!keyTrigger.activeInHierarchy) //{ // levelLiftTrigger.SetActive(true); //} } break; case 18: { if (!bossDead) { if (!levelBossIntro && !dialogBox.activeInHierarchy) { bossDialogue.TriggerDialogue(bossDialogIndex); bossDialogIndex++; if (bossDialogIndex == 8) { levelBossIntro = true; } } if (boss.m_health <= 0) { bossDialogue.TriggerDialogue(9); levelLiftTrigger.SetActive(true); bossDead = true; } } } break; case 19: { if (!keyUsed) { if (!keyTrigger.activeInHierarchy) { walls1.SetTile(new Vector3Int(24, 9, 0), null); walls1.SetTile(new Vector3Int(25, 9, 0), null); walls1.SetTile(new Vector3Int(23, 9, 0), null); walls2.SetTile(new Vector3Int(25, 10, 0), null); walls2.SetTile(new Vector3Int(26, 10, 0), null); walls2.SetTile(new Vector3Int(24, 10, 0), null); wpnUI.setKey(false); keyUsed = true; } } } break; case 20: { if (!bossDead) { if (!levelBossIntro && !dialogBox.activeInHierarchy) { bossDialogue.TriggerDialogue(bossDialogIndex); bossDialogIndex++; if (bossDialogIndex == 14) { //cinematic levelBossIntro = true; } } if (boss.m_health <= 0 && !dialogBox.activeInHierarchy) { //if boss is ninjaroth change to Good Ending if (timeline.playableDirector != timeline.timeline[1]) { timeline.ChangeDirector("Bad Ending"); } bossDialogue.TriggerDialogue(bossDialogIndex); bossDialogIndex++; levelLiftTrigger.SetActive(true); if (bossDialogIndex == 19) { bossDead = true; } //if (bossDialogIndex == 19) //{ // // just for timeline QA // timeline.ChangeDirector("Good Ending"); // bossDialogue.TriggerDialogue(bossDialogIndex); // bossDialogIndex++; // if (bossDialogIndex == 27) // bossDead = true; // //dramatic death SE // //freeze on enemy as he dies // //end cinematic // levelLiftTrigger.SetActive(true); //} } } } break; default: break; } //if (SceneManager.GetActiveScene().buildIndex == 1 && !keyUsed) //{ // if (!keyTrigger.activeInHierarchy) // { // Debug.Log("key worked"); // objInfWalls.SetTile(new Vector3Int(7, 14, 0), null); // objInfWalls.SetTile(new Vector3Int(6, 14, 0), null); // objInfWalls.SetTile(new Vector3Int(5, 14, 0), null); // walls1.SetTile(new Vector3Int(4, 13, 0), null); // walls1.SetTile(new Vector3Int(5, 13, 0), null); // walls1.SetTile(new Vector3Int(6, 13, 0), null); // } //} //if (SceneManager.GetActiveScene().buildIndex == 2 && !enemyDead) //{ // if (level2Enemy1.m_health <= 0 || level2Enemy2.m_health <= 0) // { // levelLiftTrigger.SetActive(true); // level2End.TriggerDialogue(0); // enemyDead = true; // } //} //if (SceneManager.GetActiveScene().buildIndex == 3 && !bossDead) //{ // if (boss.m_health <= 0) // { // //dramatic death SE // //freeze on enemy as he dies // bossDialogue.TriggerDialogue(0); // levelLiftTrigger.SetActive(true); // bossDead = true; // } //} //if (SceneManager.GetActiveScene().buildIndex == 4 && !keyUsed) //{ // if(!keyTrigger.activeInHierarchy) // { // walls2.SetTile(new Vector3Int(26, 10, 0), null); // walls2.SetTile(new Vector3Int(26, 11, 0), null); // walls2.SetTile(new Vector3Int(26, 12, 0), null); // walls1.SetTile(new Vector3Int(25, 9, 0), null); // walls1.SetTile(new Vector3Int(25, 10, 0), null); // walls1.SetTile(new Vector3Int(25, 11, 0), null); // } //} //if (SceneManager.GetActiveScene().buildIndex == 5 && !keyUsed) //{ // if (!keyTrigger.activeInHierarchy) // { // levelLiftTrigger.SetActive(true); // } //} //if (SceneManager.GetActiveScene().buildIndex == 6 && !bossDead) //{ // if(!levelBossIntro) // { // bossDialogue.TriggerDialogue(0); // levelBossIntro = true; // } // if (boss.m_health <= 0) // { // //dramatic death SE // //freeze on enemy as he dies // bossDialogue.TriggerDialogue(1); // levelLiftTrigger.SetActive(true); // bossDead = true; // } //} //if (SceneManager.GetActiveScene().buildIndex == 8 && !keyUsed) //{ // if (!keyTrigger.activeInHierarchy) // { // walls2.SetTile(new Vector3Int(23, 28, 0), null); // walls2.SetTile(new Vector3Int(23, 29, 0), null); // walls2.SetTile(new Vector3Int(23, 30, 0), null); // walls1.SetTile(new Vector3Int(22, 27, 0), null); // walls1.SetTile(new Vector3Int(22, 28, 0), null); // walls1.SetTile(new Vector3Int(22, 29, 0), null); // } // if (!keyTriggerTwo.activeInHierarchy) // { // walls2.SetTile(new Vector3Int(30, 10, 0), null); // walls2.SetTile(new Vector3Int(30, 11, 0), null); // walls2.SetTile(new Vector3Int(30, 12, 0), null); // walls1.SetTile(new Vector3Int(29, 9, 0), null); // walls1.SetTile(new Vector3Int(29, 10, 0), null); // walls1.SetTile(new Vector3Int(29, 11, 0), null); // } //} //if (SceneManager.GetActiveScene().buildIndex == 9 && !bossDead) //{ // if (!levelBossIntro) // { // bossDialogue.TriggerDialogue(0); // levelBossIntro = true; // } // if (boss.m_health <= 0) // { // //dramatic death SE // //freeze on enemy as he dies // bossDialogue.TriggerDialogue(1); // levelLiftTrigger.SetActive(true); // bossDead = true; // } //} //if (SceneManager.GetActiveScene().buildIndex == 11 && !keyUsed) //{ // if (!keyTrigger.activeInHierarchy) // { // //door top // objInfWalls.SetTile(new Vector3Int(36, 32, 0), null); // objInfWalls.SetTile(new Vector3Int(37, 32, 0), null); // objInfWalls.SetTile(new Vector3Int(38, 32, 0), null); // walls1.SetTile(new Vector3Int(35, 31, 0), null); // walls1.SetTile(new Vector3Int(36, 31, 0), null); // walls1.SetTile(new Vector3Int(37, 31, 0), null); // //door mid-right // objInfWalls.SetTile(new Vector3Int(33, 19, 0), null); // objInfWalls.SetTile(new Vector3Int(33, 18, 0), null); // objInfWalls.SetTile(new Vector3Int(33, 17, 0), null); // walls1.SetTile(new Vector3Int(32, 18, 0), null); // walls1.SetTile(new Vector3Int(32, 17, 0), null); // walls1.SetTile(new Vector3Int(32, 16, 0), null); // //door right // objInfWalls.SetTile(new Vector3Int(35, 31, 0), null); // objInfWalls.SetTile(new Vector3Int(36, 31, 0), null); // objInfWalls.SetTile(new Vector3Int(37, 31, 0), null); // walls1.SetTile(new Vector3Int(38, 10, 0), null); // walls1.SetTile(new Vector3Int(37, 10, 0), null); // walls1.SetTile(new Vector3Int(36, 10, 0), null); // //door left // objInfWalls.SetTile(new Vector3Int(11, 26, 0), null); // objInfWalls.SetTile(new Vector3Int(12, 26, 0), null); // objInfWalls.SetTile(new Vector3Int(13, 26, 0), null); // walls1.SetTile(new Vector3Int(10, 25, 0), null); // walls1.SetTile(new Vector3Int(11, 25, 0), null); // walls1.SetTile(new Vector3Int(12, 25, 0), null); // } //} //if (SceneManager.GetActiveScene().buildIndex == 12 && !bossDead) //{ // if (!levelBossIntro) // { // bossDialogue.TriggerDialogue(0); // levelBossIntro = true; // } // if (boss.m_health <= 0) // { // bossDialogue.TriggerDialogue(1); // levelLiftTrigger.SetActive(true); // bossDead = true; // } //} //if (SceneManager.GetActiveScene().buildIndex == 13 && !keyUsed) //{ // if (!keyTrigger.activeInHierarchy) // { // //door top // objInfWalls.SetTile(new Vector3Int(33, 17, 0), null); // objInfWalls.SetTile(new Vector3Int(34, 17, 0), null); // objInfWalls.SetTile(new Vector3Int(35, 17, 0), null); // walls1.SetTile(new Vector3Int(34, 16, 0), null); // walls1.SetTile(new Vector3Int(33, 16, 0), null); // walls1.SetTile(new Vector3Int(32, 16, 0), null); // } //} //if (SceneManager.GetActiveScene().buildIndex == 14) //{ // if (!keyTrigger.activeInHierarchy) // { // levelLiftTrigger.SetActive(true); // } //} //if (SceneManager.GetActiveScene().buildIndex == 15 && !bossDead) //{ // if (!levelBossIntro) // { // bossDialogue.TriggerDialogue(0); // levelBossIntro = true; // } // if (boss.m_health <= 0) // { // //dramatic death SE // //freeze on enemy as he dies // bossDialogue.TriggerDialogue(1); // levelLiftTrigger.SetActive(true); // bossDead = true; // } //} //if (SceneManager.GetActiveScene().buildIndex == 16) //{ // //If pressure pad activated then reopen the above doors (awaiting pressure pad prefab) // /* // * Below to go into the if function // walls1.SetTile(new Vector3Int(12, 26, 0), null); // walls1.SetTile(new Vector3Int(12, 25, 0), null); // walls1.SetTile(new Vector3Int(12, 24, 0), null); // walls2.SetTile(new Vector3Int(13, 27, 0), null); // walls2.SetTile(new Vector3Int(13, 26, 0), null); // walls2.SetTile(new Vector3Int(13, 25, 0), null); // */ //} //if (SceneManager.GetActiveScene().buildIndex == 16) //{ // if (!keyTrigger.activeInHierarchy) // { // levelLiftTrigger.SetActive(true); // } //} //if (SceneManager.GetActiveScene().buildIndex == 18 && !bossDead) //{ // if (!levelBossIntro && !dialogBox.activeInHierarchy) // { // bossDialogue.TriggerDialogue(bossDialogIndex); // bossDialogIndex++; // if (bossDialogIndex == 8) // { // levelBossIntro = true; // } // } // if (boss.m_health <= 0) // { // bossDialogue.TriggerDialogue(9); // levelLiftTrigger.SetActive(true); // bossDead = true; // } //} //if (SceneManager.GetActiveScene().buildIndex == 19) //{ // if (!keyTrigger.activeInHierarchy) // { // walls1.SetTile(new Vector3Int(24, 10, 0), null); // walls1.SetTile(new Vector3Int(25, 10, 0), null); // walls1.SetTile(new Vector3Int(26, 10, 0), null); // walls2.SetTile(new Vector3Int(25, 11, 0), null); // walls2.SetTile(new Vector3Int(26, 11, 0), null); // walls2.SetTile(new Vector3Int(27, 11, 0), null); // } //} //if (SceneManager.GetActiveScene().buildIndex == 20 && !bossDead) //{ // if (!levelBossIntro && !dialogBox.activeInHierarchy) // { // bossDialogue.TriggerDialogue(bossDialogIndex); // bossDialogIndex++; // if (bossDialogIndex == 14) // //cinematic // levelBossIntro = true; // } // if (boss.m_health <= 0) // { // //dramatic death SE // //freeze on enemy as he dies // //end cinematic // levelLiftTrigger.SetActive(true); // bossDead = true; // } //} }
private void Update() { if (SceneManager.GetActiveScene().buildIndex == 12 && !bossDead) { if (!levelBossIntro) { bossDialogue.TriggerDialogue(0); levelBossIntro = true; } if (boss.m_health <= 0) { bossDialogue.TriggerDialogue(1); levelLiftTrigger.SetActive(true); bossDead = true; } } if (SceneManager.GetActiveScene().buildIndex == 14) { if (!keyTrigger.activeInHierarchy) { levelLiftTrigger.SetActive(true); } //If pressure pad activated then reopen the above doors (awaiting pressure pad prefab) /* * Below to go into the if function * walls1.SetTile(new Vector3Int(12, 26, 0), null); * walls1.SetTile(new Vector3Int(12, 25, 0), null); * walls1.SetTile(new Vector3Int(12, 24, 0), null); * walls2.SetTile(new Vector3Int(13, 27, 0), null); * walls2.SetTile(new Vector3Int(13, 26, 0), null); * walls2.SetTile(new Vector3Int(13, 25, 0), null); */ } if (SceneManager.GetActiveScene().buildIndex == 16) { if (!enemyToKill.activeInHierarchy) { levelLiftTrigger.SetActive(true); } } if (SceneManager.GetActiveScene().buildIndex == 18 && !bossDead) { if (!levelBossIntro && !dialogBox.activeInHierarchy) { bossDialogue.TriggerDialogue(bossDialogIndex); bossDialogIndex++; if (bossDialogIndex == 8) { levelBossIntro = true; } } if (boss.m_health <= 0) { Debug.Log("DEAD"); bossDialogue.TriggerDialogue(9); levelLiftTrigger.SetActive(true); bossDead = true; } } if (SceneManager.GetActiveScene().buildIndex == 19) { if (!keyTrigger.activeInHierarchy) { walls1.SetTile(new Vector3Int(24, 10, 0), null); walls1.SetTile(new Vector3Int(25, 10, 0), null); walls1.SetTile(new Vector3Int(26, 10, 0), null); walls2.SetTile(new Vector3Int(25, 11, 0), null); walls2.SetTile(new Vector3Int(26, 11, 0), null); walls2.SetTile(new Vector3Int(27, 11, 0), null); } } }
// Update is called once per frame void Update() { if (SceneManager.GetActiveScene().buildIndex == 11 && !keyUsed) { if (!keyTrigger.activeInHierarchy) { Debug.Log("key worked"); //door top objInfWalls.SetTile(new Vector3Int(36, 32, 0), null); objInfWalls.SetTile(new Vector3Int(37, 32, 0), null); objInfWalls.SetTile(new Vector3Int(38, 32, 0), null); objWalls.SetTile(new Vector3Int(35, 31, 0), null); objWalls.SetTile(new Vector3Int(36, 31, 0), null); objWalls.SetTile(new Vector3Int(37, 31, 0), null); //door mid-right objInfWalls.SetTile(new Vector3Int(33, 19, 0), null); objInfWalls.SetTile(new Vector3Int(33, 18, 0), null); objInfWalls.SetTile(new Vector3Int(33, 17, 0), null); objWalls.SetTile(new Vector3Int(32, 18, 0), null); objWalls.SetTile(new Vector3Int(32, 17, 0), null); objWalls.SetTile(new Vector3Int(32, 16, 0), null); //door right objInfWalls.SetTile(new Vector3Int(35, 31, 0), null); objInfWalls.SetTile(new Vector3Int(36, 31, 0), null); objInfWalls.SetTile(new Vector3Int(37, 31, 0), null); objWalls.SetTile(new Vector3Int(38, 10, 0), null); objWalls.SetTile(new Vector3Int(37, 10, 0), null); objWalls.SetTile(new Vector3Int(36, 10, 0), null); //door left objInfWalls.SetTile(new Vector3Int(11, 26, 0), null); objInfWalls.SetTile(new Vector3Int(12, 26, 0), null); objInfWalls.SetTile(new Vector3Int(13, 26, 0), null); objWalls.SetTile(new Vector3Int(10, 25, 0), null); objWalls.SetTile(new Vector3Int(11, 25, 0), null); objWalls.SetTile(new Vector3Int(12, 25, 0), null); } } if (SceneManager.GetActiveScene().buildIndex == 13 && !keyUsed) { if (!keyTrigger.activeInHierarchy) { Debug.Log("key worked"); //door top objInfWalls.SetTile(new Vector3Int(33, 17, 0), null); objInfWalls.SetTile(new Vector3Int(34, 17, 0), null); objInfWalls.SetTile(new Vector3Int(35, 17, 0), null); objWalls.SetTile(new Vector3Int(34, 16, 0), null); objWalls.SetTile(new Vector3Int(33, 16, 0), null); objWalls.SetTile(new Vector3Int(32, 16, 0), null); } } if (SceneManager.GetActiveScene().buildIndex == 15 && !bossDead) { if (!levelBossIntro) { bossDialogue.TriggerDialogue(0); levelBossIntro = true; } if (boss.m_health <= 0) { //dramatic death SE //freeze on enemy as he dies bossDialogue.TriggerDialogue(1); levelLiftTrigger.SetActive(true); bossDead = true; } } }