public void spawnOneEnemyAnt(Transform parent) { int index = (int)Random.Range(0, 3.99f); float x = Random.Range(aSpawnMinX[index], aSpawnMaxX[index]); float y = Random.Range(aSpawnMinY[index], aSpawnMaxY[index]); GameObject antObj = Instantiate(enemyAntPrefab, new Vector3(x, y, 0), Quaternion.identity); EnemyAnt ant = antObj.GetComponent <EnemyAnt>(); ant.spawn(); bool[] walkDone = new bool[1]; ant.setDestination(queen.randomCavePoint(), walkDone); ant.transform.parent = parent; }
public SoldierChaseStrategy(EnemyAnt enemyAnt) { _enemyAnt = enemyAnt; UpdateInterval = 0.5f; }
public SoldierCombatStrategy(EnemyAnt enemyAnt) { _enemyAnt = enemyAnt; }