//弾丸強化実行 protected override void BulletCustomExe(BulletController bulletCtrl, int customSystem, float effectValue) { FixedTrackingBulletController fixedBulletCtrl = bulletCtrl.GetComponent <FixedTrackingBulletController>(); switch (customSystem) { case CUSTOM_SYSTEM_BULLET_FIX_TIME: fixedBulletCtrl.CustomFixTime(effectValue); break; case CUSTOM_SYSTEM_FIXED_SPEED: fixedBulletCtrl.CustomFixSpeed(effectValue); break; case CUSTOM_SYSTEM_FIXED_TURN_SPEED: fixedBulletCtrl.CustomFixTurnSpeed(effectValue); break; case CUSTOM_SYSTEM_AUTO_FIRE_TIME: fixedBulletCtrl.CustomAutoFireTime(effectValue); break; case CUSTOM_SYSTEM_AUTO_FIRE_DIFF: fixedBulletCtrl.CustomAutoFireDiff(effectValue); break; default: base.BulletCustomExe(bulletCtrl, customSystem, effectValue); break; } }
IEnumerator CountDownShoot() { yield return(new WaitForSeconds(fixedTime)); float procTime = 0; bool isPlayAudio = true; foreach (GameObject bullet in shootBullets) { if (bullet == null) { yield break; } FixedTrackingBulletController ctrl = bullet.GetComponent <FixedTrackingBulletController>(); if (ctrl != null) { isPlayAudio = (procTime == 0 || procTime - Time.time >= 0.1f); ctrl.Shoot(isPlayAudio); procTime = Time.time; if (fixedDiffTime > 0) { yield return(new WaitForSeconds(fixedDiffTime)); } } } yield break; }