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; //} }
private void Update() { GameUpdateHandler?.Invoke(); }