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(); } }
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(); } }