예제 #1
0
    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());
    }
예제 #2
0
 private void Reload()
 {
     if (Input.GetKeyDown(KeyCode.R))
     {
         ammo_.Reload();
     }
 }
예제 #3
0
 protected override void Update()
 {
     base.Update();
     if (Input.GetKeyDown(KeyCode.R))
     {
         ammunition.Reload();
     }
 }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }