/// <summary> /// 発射 /// </summary> private void FireComs(ShootingBullet bullet) { foreach (var c in coms) { c.FireCom(bullet); } }
public void Shoot() { instanceBullet = true; GameObject bullet = GameObject.Instantiate(bulletPrefab, firepoint.position, rotationpoint.rotation); bullet.GetComponent <ShootingBullet>().speed = speed; bullet.GetComponent <ShootingBullet>().angle = angle; ShootingBullet bulletScript = bullet.GetComponent <ShootingBullet>(); bulletScript.onAir = true; }
/// <summary> /// 発射 /// </summary> public void Fire() { if (bulletPool == null) { return; } ShootingBullet b = bulletPool.GetObject(shotPos.position); b.Attacker.ExclusionTag = bulletExclusionTag; b.transform.eulerAngles = shotPos.eulerAngles; FireComs(b); }
/// <summary> /// 発射 /// </summary> public virtual void FireCom(ShootingBullet bullet) { }