TO SQUASH: Nuke ball fixes.
This commit is contained in:
@@ -20,6 +20,8 @@ public class BallSpawner : Spawner
|
||||
|
||||
public Player player;
|
||||
|
||||
public WorldFiller worldFiller;
|
||||
|
||||
private static WaitForSeconds _waitForSeconds0_5 = new WaitForSeconds(0.5f);
|
||||
|
||||
private Queue<System.Action> ballQueue = new Queue<System.Action>();
|
||||
@@ -35,6 +37,7 @@ public class BallSpawner : Spawner
|
||||
|
||||
ballQueue.Enqueue(() => SpawnBall(basicBallPrefab));
|
||||
ballQueue.Enqueue(() => SpawnBall(basicBallPrefab));
|
||||
ballQueue.Enqueue(() => SpawnBall(nuclearBallPrefab));
|
||||
basicBallCount = 2;
|
||||
|
||||
StartCoroutine(SpawnBalls());
|
||||
@@ -195,6 +198,14 @@ public class BallSpawner : Spawner
|
||||
oozeBallScript.spawner = this;
|
||||
}
|
||||
}
|
||||
else if (ballPrefab == nuclearBallPrefab)
|
||||
{
|
||||
var nuclearBallScript = newBall.GetComponent<NukeBall>();
|
||||
if (nuclearBallScript != null)
|
||||
{
|
||||
nuclearBallScript.worldFiller = worldFiller;
|
||||
}
|
||||
}
|
||||
|
||||
balls.Enqueue(newBall);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SharkSpawner : Spawner
|
||||
{
|
||||
spawnTimer += Time.fixedDeltaTime;
|
||||
|
||||
if (spawnTimer >= 1f && isActive && isSpawning && player.level >= 1)
|
||||
if (spawnTimer >= 1f && isActive && isSpawning && player.level >= 10)
|
||||
{
|
||||
spawnTimer = 0f;
|
||||
if (Random.value < spawnProbability)
|
||||
|
||||
Reference in New Issue
Block a user