Exemplo n.º 1
0
        public void FinalizeCurrentDeltaState()
        {
            lock (_dreamStateManagerLock) {
                if (_currentDeltaState.ContainsChanges())
                {
                    if (FullState == null)
                    {
                        FullState       = new DreamFullState(0);
                        FullState.Turfs = new UInt32[Program.DreamMap.Width, Program.DreamMap.Height];
                    }

                    FullState.ApplyDeltaState(_currentDeltaState);
                    FullState.ID = _currentDeltaState.ID;

                    DeltaStateFinalized.Invoke(_currentDeltaState);
                    CreateNewDeltaState();
                }
            }
        }
Exemplo n.º 2
0
        public void FinalizeCurrentDeltaState()
        {
            lock (_dreamStateManagerLock) {
                if (_currentDeltaState.ContainsChanges())
                {
                    if (FullState == null)
                    {
                        FullState = new DreamFullState(0);

                        FullState.Levels = new List <DreamFullState.Level>(Program.DreamMap.Levels.Count);
                        for (int z = 0; z < Program.DreamMap.Levels.Count; z++)
                        {
                            FullState.Levels.Add(new DreamFullState.Level(Program.DreamMap.Width, Program.DreamMap.Height));
                        }
                    }

                    FullState.ApplyDeltaState(_currentDeltaState);
                    FullState.ID = _currentDeltaState.ID;

                    DeltaStateFinalized.Invoke(_currentDeltaState);
                    CreateNewDeltaState();
                }
            }
        }