private IEnumerator FireConinuous() { while (true) { SingleUpdateUsage(); if (wepon_type == Enums.enum_wepon_type.double_blaster || wepon_type == Enums.enum_wepon_type.single_blaster) { foreach (GameObject fp in this.fire_points) { UnityFunctions.FireProjectile(prefab_blaster_laser, fp, this.order_layer - 1, projectile_speed + rb.velocity.magnitude, projectile_damage); } } else if (wepon_type == Enums.enum_wepon_type.rotary) { if (target.target_object != null) { foreach (GameObject fp in this.fire_points) { UnityFunctions.FireProjectile(prefab_blaster_laser, fp, this.order_layer - 1, projectile_speed + rb.velocity.magnitude, projectile_damage); } } } if (laserAudio != null) { AudioSource.PlayClipAtPoint(laserAudio, new Vector3(0, 0, 0)); } yield return(new WaitForSeconds(projectileFiringPeriod)); if (this.is_in_storage == true) { break; } } }
private IEnumerator FireConinuous() { while (true) { UnityFunctions.FireProjectile(prefab_blaster_laser, fire_point1, 100, fire_speed, damage); yield return(new WaitForSeconds(1)); } }