예제 #1
0
        public void Resume(IntPtr windowHandle, byte[] state)
        {
            if (windowHandle == IntPtr.Zero)
            {
                System.Diagnostics.Debug.Write("Ignoring zero int ptr");
                return;
            }

            System.Diagnostics.Debug.Write("Resuming with int ptr " + windowHandle);

            _isSuspended = false;

            if (_game == null)
            {
                _kernel = CreateEditorKernel <EditorEmbedContext> ();

                var context = _kernel.Get <IEmbedContext> ();

                ((EditorEmbedContext)context).WindowHandle = windowHandle;

                Console.WriteLine("Created game with DirectX context.");
                _game = new EditorGame(_kernel);
            }
            else
            {
                var context = _kernel.Get <IEmbedContext>();

                ((EditorEmbedContext)context).WindowHandle = windowHandle;
            }
        }
예제 #2
0
        public void Resume(IGraphicsContext graphicsContext, IWindowInfo windowInfo, byte[] state)
        {
            _isSuspended = false;

            if (_game == null)
            {
                _kernel = CreateEditorKernel <EditorEmbedContext>();

                var context = _kernel.Get <IEmbedContext>();

                ((EditorEmbedContext)context).GraphicsContext = graphicsContext;
                ((EditorEmbedContext)context).WindowInfo      = windowInfo;

                _game = new EditorGame(_kernel);
            }
        }