Exemplo n.º 1
0
        public void StartRound()
        {
            gameObject.SetActive(true);
            started       = true;
            tickCoroutine = StartCoroutine(Tick());

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

            StopCoroutine(warmupCoroutine);

            tickCoroutine = StartCoroutine("Tick");

            Debug.Log("Round Started");
            ServerRoundStarted?.Invoke();
            RpcStartRound();
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
        }