Пример #1
0
        public List <IEnemyController> SpawnEnemies(EnemyScriptableObjectList _list)
        {
            List <IEnemyController> enemyList = new List <IEnemyController>();


            for (int i = 0; i < _list.enemyList.Count; i++)
            {
                enemyList = enemyList.Concat(SpawnSingleEnemyLocations(_list.enemyList[i])).ToList();
            }

            return(enemyList);
        }
Пример #2
0
        public EnemyService(IPlayerService _playerService, IStarService _starService, IPathService _pathService, EnemyScriptableObjectList enemyList, SignalBus _signalBus, IGameService _gameService)
        {
            pathService   = _pathService;
            gameService   = _gameService;
            playerService = _playerService;
            starService   = _starService;

            signalBus = _signalBus;
            enemyScriptableObjectList = enemyList;

            signalBus.Subscribe <EnemyKillSignal>(EnemyDead);
            signalBus.Subscribe <StateChangeSignal>(OnTurnStateChange);
            signalBus.Subscribe <ResetSignal>(ResetEnemy);
            signalBus.Subscribe <GameStartSignal>(OnGameStart);
            signalBus.Subscribe <SignalAlertGuards>(AlertEnemies);
        }
Пример #3
0
 public EnemyService(EnemyScriptableObjectList _list)
 {
     listOfEnemies = _list;
 }
Пример #4
0
 private void SpawnEnemy(EnemyScriptableObjectList enemyScriptableObjectList)
 {
     enemyList = enemyFactory.SpawnEnemies(enemyScriptableObjectList);
 }