protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (!disposing)
            {
                return;
            }

            if (_window != null)
            {
                _window.EntityList.GenerateItem          -= _window.GenerateButton;
                _window.EntityList.ItemPressed           -= InteractWithItem;
                _window.StorageContainerButton.OnPressed -= TouchedContainerButton;
                _window.OnClose -= Close;
            }

            _window?.Dispose();
            _window = null;
        }
Ejemplo n.º 2
0
 public override void OnRemove()
 {
     Window.Dispose();
     base.OnRemove();
 }