private void OnTriggerEnter(Collider coll) { if (coll.gameObject.tag == "Orb") { charge.LoseCharge(-20); Destroy(coll.gameObject); } }
private void OnTriggerEnter(Collider coll) { if (coll.GetComponent <ProjectileActions>()) { if (coll.GetComponent <ProjectileActions>().type == targetType) { onHitEmit = GetComponentInChildren <ParticleSystem>(); onHitEmit.Emit(10); AudioManager.Playsound("ShieldBlock_09"); charge.GainCharge(20); Destroy(coll.gameObject); } else { AudioManager.Playsound("PlayerCollision_01"); charge.LoseCharge(-20); Destroy(coll.gameObject); } } }