public InnerGameState(StateSystem system, Input input, TextureManager textureManager, PersistentGameData gameData, Font generalFont) { _input = input; _system = system; _gameData = gameData; _generalFont = generalFont; _textureManager = textureManager; _bloodStream = new Text("BloodStream", generalFont); _bloodStream.SetColor(new Color(0, 0, 0, 1)); _bloodStream.SetPosition(-600, 0); OnGameStart(); }
public GameOverState(PersistentGameData data, StateSystem system, Input input, Font generalFont, Font titleFont) { _gameData = data; _system = system; _input = input; _generalFont = generalFont; _titleFont = titleFont; _titleWin = new Text("Completed this level!", _titleFont); _blurbWin = new Text("You defeated the invaders!", _generalFont); _titleLose = new Text("Game Over!", _titleFont); _blurbLose = new Text("Try again . ..", _generalFont); FormatText(_titleWin, 300); FormatText(_blurbWin, 200); FormatText(_titleLose, 300); FormatText(_blurbLose, 200); }
public EnemyManager(TextureManager textureManager, int leftBound, PersistentGameData gameData) { _textureManager = textureManager; _leftBound = leftBound; _gameData = gameData; if (gameData.CurrentLevel.Number >= 1) { _upComingEnemies.Add(new EnemyDef("particlesNewTop", 25)); _upComingEnemies.Add(new EnemyDef("particlesNewMiddle", 24.5)); _upComingEnemies.Add(new EnemyDef("particlesNewBottom", 24)); _upComingEnemies.Add(new EnemyDef("particlesNewTop", 23.5)); _upComingEnemies.Add(new EnemyDef("particlesNewMiddle", 19)); _upComingEnemies.Add(new EnemyDef("particlesNewBottom", 18.5)); _upComingEnemies.Add(new EnemyDef("particlesNewTop", 20)); _upComingEnemies.Add(new EnemyDef("particlesNewMiddle", 19.5)); } else { _upComingEnemies.Add(new EnemyDef("particlesMiddle", 30)); _upComingEnemies.Add(new EnemyDef("particlesTop", 29.5)); _upComingEnemies.Add(new EnemyDef("particlesBottom", 29)); _upComingEnemies.Add(new EnemyDef("particlesBottomMid", 28.5)); } _upComingEnemies.Sort(delegate (EnemyDef firstEnemy, EnemyDef secondEnemy) { return firstEnemy.LaunchTime.CompareTo(secondEnemy.LaunchTime); }); //Enemy enemy = new Enemy(_textureManager); //_enemies.Add(enemy); }