示例#1
0
 public EnemyFactory(EnemyData data)
 {
     _data = data;
 }
示例#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));
        }
示例#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));
        }
示例#4
0
        public IEnemy CreateEnemy(EnemyData data, EnemyType type)
        {
            var enemyProvider = data.GetEnemy(type);

            return(Object.Instantiate(enemyProvider));
        }