Exemplo n.º 1
0
        private void OnExiting()
        {
            if (this.isExiting)
            {
                return;
            }

            this.batcher?.Dispose();
            this.batcher = null;
            this.renderEnv?.Dispose();
            this.renderEnv = null;
            this.engine    = null;

            foreach (var disposable in this.attachedEvent)
            {
                disposable.Dispose();
            }
            this.attachedEvent.Clear();
            this.ui?.InputBindings.Clear();

            GameExt.RemoveKeyboardEvent(this);
            GameExt.RemoveMouseStateCache();
            WcR2Engine.Unload();
            ServiceManager.Instance.RemoveService <IMEHandler>();
            this.isExiting = true;
        }
Exemplo n.º 2
0
        private void Graphics_DeviceCreated(object sender, EventArgs e)
        {
            this.engine = new WcR2Engine(this.GraphicsDevice,
                                         graphics.PreferredBackBufferWidth,
                                         graphics.PreferredBackBufferHeight);

            WcR2Engine.FixEKBugs();
        }
Exemplo n.º 3
0
        private void Graphics_DeviceCreated(object sender, EventArgs e)
        {
            this.engine = new WcR2Engine(this.GraphicsDevice,
                                         graphics.PreferredBackBufferWidth,
                                         graphics.PreferredBackBufferHeight);

            WcR2Engine.FixEKBugs();

            (this.engine.AssetManager as WcR2AssetManager).DefaultContentManager = this.Content as WcR2ContentManager;
        }
Exemplo n.º 4
0
        protected override void OnExiting(object sender, EventArgs args)
        {
            base.OnExiting(sender, args);
            this.batcher.Dispose();
            this.batcher = null;
            this.renderEnv.Dispose();
            this.renderEnv = null;
            this.engine    = null;

            GameExt.RemoveKeyboardEvent(this);
            GameExt.RemoveMouseStateCache();
            WcR2Engine.Unload();
        }
Exemplo n.º 5
0
        protected override void OnExiting(object sender, EventArgs args)
        {
            base.OnExiting(sender, args);
            this.batcher.Dispose();
            this.batcher = null;
            this.renderEnv.Dispose();
            this.renderEnv = null;
            this.engine    = null;

            foreach (var disposable in this.attachedEvent)
            {
                disposable.Dispose();
            }
            this.attachedEvent.Clear();
            this.ui.InputBindings.Clear();

            GameExt.RemoveKeyboardEvent(this);
            GameExt.RemoveMouseStateCache();
            WcR2Engine.Unload();
            ServiceManager.Instance.RemoveService <IMEHandler>();
        }