public void StartWarmup() { gameObject.SetActive(true); timerSeconds = warmupTimeSeconds; StartCoroutine(TickWarmup()); ServerWarmupStarted?.Invoke(); }
public void StartWarmup() { gameObject.SetActive(true); started = false; StopAllCoroutines(); timerSeconds = warmupTimeSeconds; warmupCoroutine = StartCoroutine(TickWarmup()); warmingUp = true; ServerWarmupStarted?.Invoke(); RpcStartWarmup(); }
public void StartWarmup() { // These activities will happen both on the server and client. gameObject.SetActive(true); StopAllCoroutines(); timerSeconds = warmupTimeSeconds; ServerWarmupStarted?.Invoke(); // Only do SyncVar assignments, tick coroutine and the RPC on the server. if (isServer) { started = false; warmingUp = true; warmupCoroutine = StartCoroutine(TickWarmup()); RpcStartWarmup(); } }
private void RpcStartWarmup() { if (isServer) { return; } gameObject.SetActive(true); started = false; StopAllCoroutines(); timerSeconds = warmupTimeSeconds; warmupCoroutine = StartCoroutine(TickWarmup()); warmingUp = true; ServerWarmupStarted?.Invoke(); }