public static void Initialize(Game1 myGame, String filename) { game = myGame; setNum = 0; if (filename.Equals("")) { filenames[0] = "Mario Level 1-1.csv"; } else { filenames[0] = filename; } filenames[1] = ""; currentFilename = filenames[0]; LevelManager.ResetLevel(); LevelManager.Initialize(myGame); marioStartLocation = new Vector2(50, screenHeight - 50); spriteSet.players = new List <IPlayer>(); spriteSet = LevelManager.LoadLevel(currentFilename, new Vector2(0, 0), setNum, spriteSet); int life = 3; camera = GetCamera(); spriteSet.players[0].SetLives(life); spriteSet.players[0].SwitchToSmallMario(false); Display.Initalize(); RemainingLives.Initalize(); RemainingLives.ResetTimer(); }
protected override void Initialize() { WorldManager.Initialize(this, filename); if (jumpOnlyMode) { controllerList = jumpOnlyControllerList; } else { controllerList = defaultControllerList; } GameOver.Initalize(); RemainingLives.Initalize(); GameOver.ZeroTimer(); base.Initialize(); }