void Update() { if (!started) { return; } if (Input.GetButtonDown("RedPuppet")) { if (ammo.CanFire(true)) { ammo.Fire(true); } else { if (!RedReloading) { RedReloading = true; ammo.AddBullet(true); } } } if (Input.GetButtonUp("RedPuppet")) { if (!ammo.CanFire(true) && RedReloading) { RedReloading = false; ammo.RemoveBullet(true); } } if (Input.GetButtonDown("BluePuppet")) { if (ammo.CanFire(false)) { ammo.Fire(false); } else { if (!BlueReloading) { BlueReloading = true; ammo.AddBullet(false); } } } if (Input.GetButtonUp("BluePuppet")) { if (!ammo.CanFire(false) && BlueReloading) { BlueReloading = false; ammo.RemoveBullet(false); } } }
private void HoldReload(bool red, int index) { bool[] reloading = red ? ReloadingRed : ReloadingBlue; AudienceScript.Show(index, AudienceUIScript.Notice.Correct, red); if (!reloading[index]) { reloading[index] = true; AmmoScript.AddBullet(red); } }