private void On(BackgroundPlaceEvent e) { this._lock.EnterReadLock(); try { if (!this.InternalBackground.Remove(e.Old.Block, new Point(e.X, e.Y))) { return; // Unknown block! } this.InternalBackground.Add(e.New.Block, new Point(e.X, e.Y)); } finally { this._lock.ExitReadLock(); } }
internal static bool AreSame(PlaceSendMessage sent, BackgroundPlaceEvent received) { return(sent.Id == (int)received.New.Block.Id); }
private void OnBackground(BackgroundPlaceEvent e) { this.Repair <BackgroundPlaceEvent, BackgroundBlock>(Layer.Background, e); }