Beispiel #1
0
        public void StartRound()
        {
            gameObject.SetActive(true);
            started       = true;
            tickCoroutine = StartCoroutine(Tick());

            ServerRoundStarted?.Invoke();
        }
Beispiel #2
0
        public void StartRound()
        {
            gameObject.SetActive(true);
            started   = true;
            warmingUp = false;

            StopCoroutine(warmupCoroutine);

            tickCoroutine = StartCoroutine("Tick");

            Debug.Log("Round Started");
            ServerRoundStarted?.Invoke();
            RpcStartRound();
        }
Beispiel #3
0
        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();
            }
        }
Beispiel #4
0
        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();
        }