コード例 #1
0
        public static IWindow Create(WindowProp props, PlatformEnum platform)
        {
            switch (platform)
            {
            case PlatformEnum.Windows:
                WindowsInput.Init();
                return(new Platform.Windows.Window(props));

            default:
                throw new NotImplementedException("Platform not supported");
            }
        }
コード例 #2
0
        public Application(WindowProp prop)
        {
            CoreAssert.Assert(_instance == null, "Only one app can run at the time!");

            _layerStack = new LayerStack();

            Log.Init();

            _window = WindowFactory.Create(prop, PlatformEnum.Windows);
            _window.SetEventHandler(OnEvent);

            _instance = this;
        }