Beispiel #1
0
    // -----------------------------------------------------------------------------------
    // UCE_DoorValidation
    // -----------------------------------------------------------------------------------
    public bool UCE_DoorValidation()
    {
        bool bValid = (UCE_selectedDoor != null &&
                       UCE_selectedDoor.checkInteractionRange(this) &&
                       UCE_selectedDoor.interactionRequirements.checkState(this));

        if (!bValid)
        {
            UCE_cancelDoor();
        }

        return(bValid);
    }
Beispiel #2
0
    protected void Cmd_UCE_checkDoorAccess(GameObject _UCE_selectedDoor)
    {
        UCE_selectedDoor = _UCE_selectedDoor.GetComponent <UCE_Doors>();

        if (UCE_DoorValidation())
        {
            Target_UCE_startDoorAccess(connectionToClient);
        }
        else
        {
            if (UCE_selectedDoor != null && UCE_selectedDoor.checkInteractionRange(this) && UCE_selectedDoor.lockedMessage != "")
            {
                UCE_ShowPrompt(UCE_selectedDoor.lockedMessage);
            }
            else
            {
                movement.Navigate(this.collider.ClosestPointOnBounds(transform.position), 0);
            }
        }
    }