Ejemplo n.º 1
0
        public virtual void UpdateState(T state)
        {
            //lock (_lock)
            //{
            if (_isUpdating)
            {
                Debug.LogError("Received update before previous finished. Skipping:\n" + state.ToString());
                return;
            }

            _isUpdating = true;
            if (GameUpdateEvent != null)
            {
                GameUpdateEvent.Invoke(state);
            }
            _gameState  = state;
            _isUpdating = false;
            //}
        }
Ejemplo n.º 2
0
 private void Update()
 {
     GameUpdateHandler?.Invoke();
 }