/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (TheGreatPaperGame game = new TheGreatPaperGame()) { game.Run(); } }
/// <summary> /// Load texture for background /// </summary> /// <param name="level"></param> public void LoadMapContent(TheGreatPaperGame Game) { Logger.Log(LogLevel.Info, "Loading map content"); this.mapContentManager = new ContentManager(Game.Services); this.mapContentManager.RootDirectory = "Content"; if (background1 != null) { background1.LoadContent(this.mapContentManager); } if (background2 != null) { background2.LoadContent(this.mapContentManager); } if (background3 != null) { background3.LoadContent(this.mapContentManager); } if (music != null) { music.Song = this.mapContentManager.Load <Song>("sfx/Music/" + music.FileName); } foreach (BadGuy b in EnemyRessourcesToLoad) { b.LoadContent(this.mapContentManager); } foreach (MySong s in MusicRessourcesToLoad) { s.Song = this.mapContentManager.Load <Song>("sfx/Music/" + s.FileName); } Logger.Log(LogLevel.Info, "Map content loaded !"); }
public LoadingScreen(MapOverview overview, TheGreatPaperGame Game) { this.Initialize(); this.Game = Game; loading1 = new Rectangle(0, 356, 270, 178); loading2 = new Rectangle(0, 178, 270, 178); loading3 = new Rectangle(0, 0, 270, 178); currentloading = loading1; background = new Rectangle(300, 0, 1024, 768); backgroundDst = background; backgroundDst.X = 0; backgroundDst.Y = 0; backgroundDst.Width = TGPAContext.Instance.ScreenWidth; backgroundDst.Height = TGPAContext.Instance.ScreenHeight; this.overview = overview; this.previewBG1 = null; this.previewBG1Fadeout = 0.0f; this.previewBG2 = null; this.previewBG2Fadeout = 0.0f; this.IsLoaded = false; }
/// <summary> /// Load texture for background /// </summary> /// <param name="level"></param> public void LoadMapContent(TheGreatPaperGame Game) { Logger.Log(LogLevel.Info, "Loading map content"); this.mapContentManager = new ContentManager(Game.Services); this.mapContentManager.RootDirectory = "Content"; if (background1 != null) background1.LoadContent(this.mapContentManager); if (background2 != null) background2.LoadContent(this.mapContentManager); if (background3 != null) background3.LoadContent(this.mapContentManager); if (music != null) { music.Song = this.mapContentManager.Load<Song>("sfx/Music/" + music.FileName); } foreach (BadGuy b in EnemyRessourcesToLoad) b.LoadContent(this.mapContentManager); foreach (MySong s in MusicRessourcesToLoad) s.Song = this.mapContentManager.Load<Song>("sfx/Music/" + s.FileName); Logger.Log(LogLevel.Info, "Map content loaded !"); }