public GamePage() { this.InitializeComponent(); // Create the game. var launchArguments = string.Empty; _game = MonoGame.Framework.XamlGame <NexusDungeonGame> .Create(launchArguments, Window.Current.CoreWindow, swapChainPanel); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); _game = new NexusDungeonGame(); _view = _game.Services.GetService(typeof(View)) as View; SetContentView(_view); _game.Run(); }
//################################################################################################################################################################// //Constructeur public Level(Microsoft.Xna.Framework.Game game, SpriteBatch spriteBatch, IServiceProvider serviceProvider, Stream fileStream, int levelIndex) { this.game = game; this.nexusgame = (NexusDungeonGame)game; this.spriteBatch = spriteBatch; Content = new ContentManager(serviceProvider, "Content"); ScalePresentationArea(); LoadTiles(fileStream); MediaPlayer.Play(game.Content.Load <Song>("Sprites/Sounds/dungeon")); MediaPlayer.MoveNext(); exitReachedSound = Content.Load <Song>("Sprites/Sounds/forest"); }