1ea616dd60
Enemy balance, added upgrades, added score, added menu
23 lines
503 B
C#
23 lines
503 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class FindEnemy : MonoBehaviour
|
|
{
|
|
private GameObject[] gameObjects;
|
|
void Update()
|
|
{
|
|
gameObjects = GameObject.FindGameObjectsWithTag("Enemy");
|
|
Invoke("DestroyDoor", 1.0f);
|
|
}
|
|
|
|
void DestroyDoor()
|
|
{
|
|
if (gameObjects.Length == 0)
|
|
{
|
|
Debug.Log("No game objects are tagged with 'Enemy'. Opening door");
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|