Speedy berry fixes
This commit is contained in:
@@ -337,11 +337,18 @@ public class GamePlayer : MonoBehaviour
|
|||||||
|
|
||||||
void SpawnBerries()
|
void SpawnBerries()
|
||||||
{
|
{
|
||||||
if (!(Time.time >= nextSpawnTime))
|
if (Time.time < nextSpawnTime)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (speedyLeft > 0)
|
||||||
|
{
|
||||||
|
nextSpawnTime = Time.time + 1f / (spawnRate * 1.875f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
nextSpawnTime = Time.time + 1f / spawnRate;
|
nextSpawnTime = Time.time + 1f / spawnRate;
|
||||||
|
}
|
||||||
float spawnProbability = Random.value;
|
float spawnProbability = Random.value;
|
||||||
if (!pausePanel.activeSelf)
|
if (!pausePanel.activeSelf)
|
||||||
{
|
{
|
||||||
@@ -614,6 +621,7 @@ public class GamePlayer : MonoBehaviour
|
|||||||
score = 0;
|
score = 0;
|
||||||
boostLeft = 0f;
|
boostLeft = 0f;
|
||||||
slownessLeft = 0f;
|
slownessLeft = 0f;
|
||||||
|
speedyLeft = 0f;
|
||||||
UpdateStats(0);
|
UpdateStats(0);
|
||||||
GameObject[] berries = GameObject.FindGameObjectsWithTag("Berry");
|
GameObject[] berries = GameObject.FindGameObjectsWithTag("Berry");
|
||||||
GameObject[] poisonberries = GameObject.FindGameObjectsWithTag("PoisonBerry");
|
GameObject[] poisonberries = GameObject.FindGameObjectsWithTag("PoisonBerry");
|
||||||
|
|||||||
Reference in New Issue
Block a user