Exemplo n.º 1
0
        public void StartSimulate()
        {
            if (IsRunning)
            {
                Debug.LogError("Already started!");
                return;
            }

            _world.StartGame(_gameStartInfo, _localActorId);
            IsRunning = true;
            SetPurchaseTimestamp();
            Debug.Log($"Game Start");
            EventHelper.Trigger(EEvent.SimulationStart, null);
        }
        public void StartSimulate()
        {
            if (IsRunning)
            {
                Debug.LogError("Already started!");
                return;
            }

            IsRunning = true;
            if (_constStateService.IsClientMode)
            {
                _gameStartTimestampMs = LTime.realtimeSinceStartupMS;
            }

            _world.StartGame(_gameStartInfo, LocalActorId);
            Debug.Log($"Game Start");
            EventHelper.Trigger(EEvent.SimulationStart, null);

            while (inputTick < PreSendInputCount)
            {
                SendInputs(inputTick++);
            }
        }