public EnemyFactory(EnemyData data) { _data = data; }
public IEnemy CreateEnemy(EnemyData data, EnemyType type, Transform placeHolder) { var enemyProvider = data.GetEnemy(type); return(Object.Instantiate(enemyProvider, Vector3.zero, Quaternion.identity, placeHolder)); }
public IEnemy CreateEnemy(EnemyData data, EnemyType type) { var enemyProvider = data.GetEnemy(type); return(Object.Instantiate(enemyProvider, new Vector3(Random.Range(-5, 5), Random.Range(-5, 5)), Quaternion.identity)); }
public IEnemy CreateEnemy(EnemyData data, EnemyType type) { var enemyProvider = data.GetEnemy(type); return(Object.Instantiate(enemyProvider)); }