void Start() { Time.timeScale = 0; _startGame.SetActive(true); _timerObj = new Timer(_levelDuration); _fieldObj = new Field(_land, _sea); _fieldObj.Init(); _seaEnemyObj = new SeaEnemy(_seaEnemy, _fieldObj); _seaEnemies.Add(_seaEnemyObj); _seaEnemyObj.InitSeaEnemies(_seaEnemies); _playerObj = new PlayerCtrl(_playerInLand, _playerInSea, _fieldObj, _track, _seaEnemies); _seaEnemyObj.Init(_playerObj); _landEnemyObj = new LandEnemy(_landEnemy, _fieldObj, _playerObj); _nextLevelObj = new NextLevel(_nextLevel, _fieldObj); _info = new InfoCtrl(_score, _lvl, _xn, _full, _time, _fieldObj, _seaEnemyObj, _playerObj, _timerObj); _gameOverObj = new GameOver(_gameOver, _playerObj, _seaEnemyObj, _seaEnemies, _landEnemyObj, _timerObj); }
public GameOver(GameObject panel, PlayerCtrl player, SeaEnemy seaEnemy, List <SeaEnemy> seaEnemies, LandEnemy landEnemy, Timer timer) { _panel = panel; _player = player; _seaEnemy = seaEnemy; _seaEnemies = seaEnemies; _landEnemy = landEnemy; _timer = timer; }
public void NewEnemy() { //TO DO enemy1 = new AerialEnemy(); enemy1.MoveTo(600, (short)(200 - enemy1.SPRITE_HEIGHT)); enemy2 = new JumpEnemy(); enemy2.MoveTo(85, (short)(666 - enemy2.SPRITE_HEIGHT)); enemy3 = new LandEnemy(); enemy3.MoveTo(700, (short)(666 - enemy3.SPRITE_HEIGHT)); Enemies.Add(enemy1); Enemies.Add(enemy2); Enemies.Add(enemy3); }