Beispiel #1
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        /// <filterpriority>2</filterpriority>
        public void Dispose()
        {
            //SystemManager.Instance.UpdateSignal.Disconnect(_updateSlot);
            SystemManager.Instance.RenderSignal.Disconnect(RenderSlot);
            SystemManager.Instance.ResizeSignal.Disconnect(ResizeSlot);
            //SystemManager.Instance.LevelInitSignal.Disconnect(LevelInitSlot);
            //SystemManager.Instance.LevelLoadedSignal.Disconnect(LevelInitSlot);
            SystemManager.Instance.SceneChangeSignal.Disconnect(SceneChangeSlot);
            //SystemManager.Instance.LevelLoadedSignal.Disconnect(LevelInitSlot);

            List <Stage> stages = new List <Stage>();

            _stageListDesc.ForEach(delegate(Stage s)
            {
                stages.Add(s);
            });
            stages.ForEach(delegate(Stage s) { s.Dispose(); });

            _stageListDesc.Clear();
            _stageListAsc.Clear();
            _instance = null;
        }
Beispiel #2
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        /// <filterpriority>2</filterpriority>
        public void Dispose()
        {
            //SystemManager.Instance.UpdateSignal.Disconnect(_updateSlot);
            SystemManager.Instance.RenderSignal.Disconnect(RenderSlot);
            SystemManager.Instance.ResizeSignal.Disconnect(ResizeSlot);
            //SystemManager.Instance.LevelInitSignal.Disconnect(LevelInitSlot);
            //SystemManager.Instance.LevelLoadedSignal.Disconnect(LevelInitSlot);
            SystemManager.Instance.SceneChangeSignal.Disconnect(SceneChangeSlot);
            //SystemManager.Instance.LevelLoadedSignal.Disconnect(LevelInitSlot);

            List<Stage> stages = new List<Stage>();
            _stageListDesc.ForEach(delegate (Stage s)
                                       {
                                           stages.Add(s);
                                       });
            stages.ForEach(delegate(Stage s) { s.Dispose(); });

            _stageListDesc.Clear();
            _stageListAsc.Clear();
            _instance = null;
        }