private void OnTriggerEnter(Collider other) { if (other.GetComponent <Enemy>() != null) { other.GetComponent <Enemy>().IsDie = true; carrier.DecreaseAmount(); } }