// ------------------------------------------------------------------------------- // OnTriggerExit // ------------------------------------------------------------------------------- private void OnTriggerExit2D(Collider2D co) { Player player = co.GetComponentInParent <Player>(); if (player && isActive && teleportationTarget.Valid) { player.UCE_myTimegate = null; if (!_UCE_UI_Timegate) { _UCE_UI_Timegate = FindObjectOfType <UCE_UI_Timegate>(); } _UCE_UI_Timegate.Hide(); } }
// ------------------------------------------------------------------------------- // OnTriggerEnter // ------------------------------------------------------------------------------- private void OnTriggerEnter(Collider co) { Player player = co.GetComponentInParent <Player>(); if (player && isActive && teleportationTarget.Valid) { player.UCE_myTimegate = this; if (!_UCE_UI_Timegate) { _UCE_UI_Timegate = FindObjectOfType <UCE_UI_Timegate>(); } _UCE_UI_Timegate.Show(); } }