Beispiel #1
0
 public void SpawnEnemies()
 {
     if (!dm.IsDeathMenuActive())
     {
         for (int i = 0; i < totalSpawnedEnemies; i++)
         {
             int chosenSpawner = Random.Range(0, spawners.Length);
             spawners[chosenSpawner].GetComponent <Spawner>().Spawn();
         }
     }
 }
    // Update is called once per frame
    void Update()
    {
        if (!dm.IsDeathMenuActive())
        {
            currentFOV = cam.orthographicSize; //keep track of Current FOV


            if (didZoneShrink) //Zone is shrinking
            {
                ChangeFOV();
            }
            else
            {
                zoomTimer -= Time.deltaTime;
                if (zoomTimer <= 0)
                {
                    ShrinkFOV(sizeDecrement);
                    zoomTimer = maxTime;
                }
            }
        }
    }