private void Update() { if (UmpireControl.isGameStarted && !m_isGunInitiated) { m_ammunition.Reload(); m_isGunInitiated = true; } m_reticle.transform.position = Raycaster.GetHitPoint() + Raycaster.GetHitNormal() * 0.001f; m_reticle.transform.rotation = Quaternion.LookRotation(Raycaster.GetHitNormal()); }
private void Reload() { if (Input.GetKeyDown(KeyCode.R)) { ammo_.Reload(); } }
protected override void Update() { base.Update(); if (Input.GetKeyDown(KeyCode.R)) { ammunition.Reload(); } }
public void Should_not_exceed_maximum_loadout(int reloadTimes) { Ammunition target = GetTarget(); Ammunition current = target; for (int i = 0; i < reloadTimes; i++) { current = current.Reload(); } Check.That(current.Loadout).IsEqualTo(10); }
public void Should_be_at_max_charge_when_reloaded_ten_times() { Ammunition target = GetTarget(); Ammunition current = target; for (int i = 0; i < 10; i++) { current = current.Reload(); } Check.That(current.Loadout).IsEqualTo(10); }