示例#1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Dart"))
     {
         referenceScript.carryCapacity = referenceScript.carryCapacity + carryCapacityBoost; // extend carry capacity
         referenceScript.magCapacity   = referenceScript.magCapacity + magCapacityBoost;     // extend mag capacity
         referenceScript.loadedRounds  = referenceScript.magCapacity;                        // reload the gun
         referenceScript.carryRounds   = referenceScript.carryCapacity;                      // fill carried load
         referenceScript.updateAmmoText();
         explode();
     }
 }
示例#2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            myAnimator.SetBool("ShowAmmoAnim", true);
            resetAnim = true;
            waitTime  = .3f;

            referenceScript.carryRounds  = referenceScript.carryCapacity;     // fill up carried round
            referenceScript.loadedRounds = referenceScript.magCapacity;       // fill up loaded rounds

            referenceScript.updateAmmoText();

            source.Play();
        }
    }