Пример #1
0
        public void StartWarmup()
        {
            gameObject.SetActive(true);
            timerSeconds = warmupTimeSeconds;
            StartCoroutine(TickWarmup());

            ServerWarmupStarted?.Invoke();
        }
Пример #2
0
        public void StartWarmup()
        {
            gameObject.SetActive(true);

            started = false;
            StopAllCoroutines();

            timerSeconds = warmupTimeSeconds;

            warmupCoroutine = StartCoroutine(TickWarmup());

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

            started = false;
            StopAllCoroutines();

            timerSeconds = warmupTimeSeconds;

            warmupCoroutine = StartCoroutine(TickWarmup());

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