TO SQUASH: Lots of UI.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SharkSpawner : MonoBehaviour
|
||||
public class SharkSpawner : Spawner
|
||||
{
|
||||
public GameObject sharkPrefab;
|
||||
|
||||
@@ -14,7 +14,7 @@ public class SharkSpawner : MonoBehaviour
|
||||
|
||||
private bool isActive = true;
|
||||
|
||||
private static float spawnProbability = 0.1f;
|
||||
private static float spawnProbability = 0.05f;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
@@ -28,7 +28,7 @@ public class SharkSpawner : MonoBehaviour
|
||||
{
|
||||
spawnTimer += Time.fixedDeltaTime;
|
||||
|
||||
if (spawnTimer >= 1f && isActive)
|
||||
if (spawnTimer >= 1f && isActive && isSpawning)
|
||||
{
|
||||
spawnTimer = 0f;
|
||||
if (Random.value < spawnProbability)
|
||||
|
||||
Reference in New Issue
Block a user