private void OnTriggerExit2D(Collider2D other) { if (other.CompareTag("Extraction")) { isTriggeringExtractionObjective = false; triggeredExtractionObjective = null; } }
private void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Extraction")) { triggeredExtractionObjective = other.GetComponentInParent <ExtractionObjective>(); isTriggeringExtractionObjective = true; } }
void PickupExtractionObject() { playerMovement.SetIsHoldingExtractionObject(true); extractionObjective = triggeredExtractionObjective; extractionObjective.OnPickup(playerNumber, this); if (SoundManager.instance != null) { SoundManager.instance.PlaySFX("SFX_WeaponPickup"); } }
public void DropExtractionObject() { extractionObjective.OnDrop(); playerMovement.SetIsHoldingExtractionObject(false); extractionObjective = null; }