private GameManager(Viewport screen) { ResourceManager = ResourceManager.Instance; Rectangle tileSave = screen.TitleSafeArea; saveGameManager = SaveGameManager.Instance; Screen = screen; GameSpeed = 1; // Move the GameBounds away from the sides because there are the palms GameBounds = new Rectangle(tileSave.X + BORDER_WIDTH, tileSave.Y-200, tileSave.Width - BORDER_WIDTH * 2, tileSave.Height+200); collidableGameEntities = new List<GameEntity>(); decorationEntities = new List<GameEntity>(); loopingBackground = new LoopingBackground(); loopingWavesRight = new LoopingWave(true, false); loopingWavesLeft = new LoopingWave(false, false); loopingWavesLow = new LoopingWave(false, true); player = new Player(); shark = new Shark(); decorationEntities.Add(shark); InitGameEntityGenerators(); gameState = GameState.Running; }
/// <summary> /// Creates a new instance of the saveGameManager /// </summary> /// <returns></returns> public static SaveGameManager CreateNewSaveGameManager() { instance = new SaveGameManager(); return instance; }