23 lines
760 B
C#

using System;
using System.Linq;
using Microsoft.Xna.Framework.Graphics;
using Syntriax.Engine.Core;
using Syntriax.Engine.Integration.MonoGame;
bool isServerEnabled = Environment.GetCommandLineArgs().FirstOrDefault(x => x.CompareTo("--server") == 0) is not null;
IUniverse universe = Pong.PongUniverse.GetPongUniverse(isServerEnabled, isClientEnabled: true);
universe.InstantiateUniverseObject().SetUniverseObject("Desktop HO")
.BehaviourController.AddBehaviour<KeyboardInputsBehaviour>();
using MonoGameWindow monoGameWindow = new(universe);
monoGameWindow.Graphics.PreferredBackBufferWidth = 1024;
monoGameWindow.Graphics.PreferredBackBufferHeight = 576;
monoGameWindow.Graphics.GraphicsProfile = GraphicsProfile.HiDef;
monoGameWindow.Run();