private void SpawnEnemyControllers()
        {
            if (listOfEnemies.isUnique)
            {
                if (listOfEnemies.enemiesToSpawn > listOfEnemies.enemyList.Count)
                {
                    Debug.Log("More scirptable objects needed");
                    return;
                }
            }
            for (int i = 0; i < listOfEnemies.enemiesToSpawn; i++)
            {
                EnemyData newData = new EnemyData();
                int       index   = UnityEngine.Random.Range(0, listOfEnemies.enemyList.Count);
                newData.indexOfScriptableObj = index;
                EnemyScriptableObject _newEnemyObj = listOfEnemies.enemyList.ElementAt(index);
                newData.spawnPosition = CreateEnemyController(_newEnemyObj);

                enemyDataList.Add(newData);
            }
        }
Exemple #2
0
 public void AttachData(EnemyData data)
 {
     m_Data = data;
 }
Exemple #3
0
 public void AttachData(EnemyData data)
 {
     m_Data = data;
     m_Overtip.SetData(m_Data);
 }
 public void AttachData(EnemyData enemyData)
 {
     m_Data = enemyData;
 }
 private void SetTargetNode(Node node, EnemyData enemyData)
 {
     m_TargetNode  = node;
     m_CurrentNode = node;
     node.EnemyDatas.Add(enemyData);
 }