private void OnTriggerExit2D(Collider2D collision) { NPCForms otherNPC = collision.GetComponent <NPCForms>(); if (otherNPC != null && otherNPC.GetForm() == currentForm) { _isTrigger = false; } }
private void OnTriggerEnter2D(Collider2D collision) { NPCForms otherNPC = collision.GetComponent <NPCForms>(); if (otherNPC != null) { _isTrigger = true; _triggerForm = otherNPC.GetForm(); } }