void OnTriggerExit2D(Collider2D other) { cDoAction = null; if (SwitchTriggerType == SwitchTriggerTypeEnum.Touch && isPressed && SwitchType == SwitchTypeEnum.Toggle) { Trigger(); isPressed = false; } }
void OnTriggerEnter2D(Collider2D other) { cDoAction = other.GetComponent <CharacterDoAction>(); }