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"); } }
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; }