Example #1
0
        public void StartWarmup()
        {
            gameObject.SetActive(true);
            timerSeconds = warmupTimeSeconds;
            StartCoroutine(TickWarmup());

            ServerWarmupStarted?.Invoke();
        }
Example #2
0
        public void StartWarmup()
        {
            gameObject.SetActive(true);

            started = false;
            StopAllCoroutines();

            timerSeconds = warmupTimeSeconds;

            warmupCoroutine = StartCoroutine(TickWarmup());

            warmingUp = true;
            ServerWarmupStarted?.Invoke();
            RpcStartWarmup();
        }
Example #3
0
        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();
            }
        }
Example #4
0
        private void RpcStartWarmup()
        {
            if (isServer)
            {
                return;
            }
            gameObject.SetActive(true);

            started = false;
            StopAllCoroutines();

            timerSeconds = warmupTimeSeconds;

            warmupCoroutine = StartCoroutine(TickWarmup());

            warmingUp = true;
            ServerWarmupStarted?.Invoke();
        }