public Pair <GameObject, GameObject> createBullet() { GameObject bullet = GameObject.Instantiate(bulletPrefab); bullet.transform.position = transform.position; BulletVisual bulletVisual = bullet.GetComponent <BulletVisual>(); bulletVisual.appearence = appearence; GameObject update = GameObject.Instantiate(bulletUpdate); update.transform.parent = bullet.transform; update.GetComponent <_BulletUpdate>().init(bulletLifetime, delaySeconds); return(new Pair <GameObject, GameObject>(bullet, update)); }
public Factory(DefaultTowerVisual prefab, BulletVisual bulletPrefab) { _prefab = prefab; _bulletPrefab = bulletPrefab; }