Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class CheckWin : MonoBehaviour
- {
- void Update()
- {
- if(GameSystem.MonsterCount == 0 && GameSystem.HP > 0)
- {
- GameObject[] enemis = GameObject.FindGameObjectsWithTag("Enemy");
- if(enemis.Length == 0)
- {
- SceneManager.LoadScene("WinLevel");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement