コード例 #1
0
    // -------------------------------------------------------------------------------
    // 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();
        }
    }
コード例 #2
0
    // -------------------------------------------------------------------------------
    // 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();
        }
    }