Example #1
0
 public EnemyFactory(EnemyData data)
 {
     _data = data;
 }
Example #2
0
        public IEnemy CreateEnemy(EnemyData data, EnemyType type, Transform placeHolder)
        {
            var enemyProvider = data.GetEnemy(type);

            return(Object.Instantiate(enemyProvider, Vector3.zero, Quaternion.identity, placeHolder));
        }
Example #3
0
        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));
        }
Example #4
0
        public IEnemy CreateEnemy(EnemyData data, EnemyType type)
        {
            var enemyProvider = data.GetEnemy(type);

            return(Object.Instantiate(enemyProvider));
        }