mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-30 12:57:06 -05:00
Merge branch 'main' of https://github.com/Lautha1/TheKingsRace
This commit is contained in:
@@ -7,10 +7,12 @@ using UnityEngine;
|
||||
public class BoulderSpawn : NetworkBehaviour
|
||||
{
|
||||
[SerializeField] private float RespawnTimer = 10.0f;
|
||||
[SerializeField] private float InitialSpawnDelay = 0.0f;
|
||||
private float currentTime = 0.0f;
|
||||
|
||||
[SerializeField] private float boulderScaleMultiplier = 1.0f;
|
||||
|
||||
|
||||
[SerializeField] private Vector3 spawnForce;
|
||||
|
||||
[SerializeField] private Vector3 SpawnLocation;
|
||||
@@ -40,9 +42,10 @@ public class BoulderSpawn : NetworkBehaviour
|
||||
if (!IsHost) { return; }
|
||||
|
||||
currentTime += Time.fixedDeltaTime;
|
||||
if (currentTime >= RespawnTimer)
|
||||
if (currentTime >= RespawnTimer + InitialSpawnDelay)
|
||||
{
|
||||
currentTime = 0.0f;
|
||||
InitialSpawnDelay = 0.0f;
|
||||
SpawnBoulderServerRPC();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user