void OnTriggerEnter(Collider otherCollider) { PartyGuy guy = otherCollider.GetComponent <PartyGuy> (); if (guy != null && guy.currentState == PartyGuy.State.Trumping) { guy.SetState(PartyGuy.State.BeingConverted); } }
void OnTriggerExit(Collider otherCollider) { PartyGuy guy = otherCollider.GetComponent <PartyGuy> (); if (guy != null) { //When he is not fully converted yet, go back to Trumping if (guy.currentState == PartyGuy.State.BeingConverted) { guy.SetState(PartyGuy.State.Trumping); } } }