public void StartRound() { gameObject.SetActive(true); started = true; tickCoroutine = StartCoroutine(Tick()); ServerRoundStarted?.Invoke(); }
public void StartRound() { gameObject.SetActive(true); started = true; warmingUp = false; StopCoroutine(warmupCoroutine); tickCoroutine = StartCoroutine("Tick"); Debug.Log("Round Started"); ServerRoundStarted?.Invoke(); RpcStartRound(); }
public void StartRound() { // These activities will happen both on the server and client. gameObject.SetActive(true); Debug.Log("Round Started"); ServerRoundStarted?.Invoke(); // Only do SyncVar assignments, tick coroutine and the RPC on the server. if (isServer) { started = true; warmingUp = false; StopCoroutine(warmupCoroutine); tickCoroutine = StartCoroutine("Tick"); RpcStartRound(); } }
public void RpcStartRound() { if (isServer) { return; } gameObject.SetActive(true); started = true; warmingUp = false; if (warmupCoroutine != null) { StopCoroutine(warmupCoroutine); } tickCoroutine = StartCoroutine("Tick"); Debug.Log("Round Started"); ServerRoundStarted?.Invoke(); }