private static IEnumerator Arrows(Gun gun, BulletScript script) { script.coroutines_running++; Quaternion rot = Quaternion.LookRotation( gun.barrel_end.forward ) * Quaternion.Euler(0, 90, 0); Flurry Gun = (Flurry)gun; GameObject b = Instantiate(Gun.Bullet, gun.barrel_end.position, rot) as GameObject; NetworkServer.Spawn(b); Gun.Claimed_Gun_Mods -= Arrows; Gun.ReadyWeaponForFire(ref b); Gun.RpcFire(b.transform.forward, b); rot = Quaternion.LookRotation( gun.barrel_end.forward ) * Quaternion.Euler(0, -90, 0); b = Instantiate(Gun.Bullet, gun.barrel_end.position, rot) as GameObject; NetworkServer.Spawn(b); Gun.ReadyWeaponForFire(ref b); Gun.RpcFire(b.transform.forward, b); while (!script.Target && !Gun.HasReloaded(-.2f)) { yield return(new WaitForFixedUpdate()); } Gun.Claimed_Gun_Mods += Arrows; script.coroutines_running--; }