Ejemplo n.º 1
0
        public ManaWindow(InitializationParameters initializationParameters)
            : base(GameWindowSettings.Default, GetNativeWindowSettings(initializationParameters))
        {
            _pendingInitializationParameters = initializationParameters;

            if (MainWindow == null)
            {
                MainWindow = this;
            }
            else
            {
                throw new InvalidOperationException("Only one ManaWindow is supported at this time.");
            }

            Console.Clear();
            Console.Title = "Mana Console";

            _log.Info($"Current Working Directory: {Directory.GetCurrentDirectory()}");

            InputProvider         = new ManaWindowInputProvider(this);
            Input.CurrentProvider = InputProvider;

            RenderContext = RenderContext.WrapWindowContext(this);

            _projectionMatrix = Matrix4.CreateOrthographicOffCenter(0f, Width, Height, 0f, -1f, 1f);
        }
Ejemplo n.º 2
0
 protected Game()
 {
     _initializationParameters = InitializationParameters.Default;
 }
Ejemplo n.º 3
0
 protected Game(InitializationParameters initializationParameters)
 {
     _initializationParameters = initializationParameters;
 }