public void Fire() { for (int i = 0; i < shootPosition.Length; i++) { GameObject obj = Instantiate(bullet, shootPosition[i].position, shootPosition[i].rotation); BulletObj bulletObj = obj.GetComponent <BulletObj>(); bulletObj.SetFather(fatherObj); } }
public override void Fire() { for (int i = 0; i < shootPos.Length; i++) { GameObject obj = Instantiate(bulletObj, shootPos[i].position, shootPos[i].rotation); BulletObj bullet = obj.GetComponent <BulletObj>(); bullet.SetFather(this); } }