Example #1
0
        protected virtual void Unload()
        {
            foreach (int id in _eventGlobalListenerIds)
            {
                GlobalEventManager.RemoveEventListener(id);
            }

            foreach (int id in _eventInputListenerIds)
            {
                InputEventManager.RemoveEventListener(id);
            }

            Client?.Disconnect("Scene Close");
        }
Example #2
0
        /// <summary>
        /// Called when a UILayer needs to be stopped
        /// </summary>
        public void Stop()
        {
            ParentScene  = null;
            RootUI       = null;
            _tabPosition = null;

            _eventIndex.Clear();
            _tabIndex.Clear();
            _updateIndex.Clear();

            foreach (int id in _eventGlobalListenerIds)
            {
                GlobalEventManager?.RemoveEventListener(id);
            }

            _inputEventListeners.Clear();
        }