// TODO: Handle Input through InputManager and not direct key references
    protected override void ActivateLogic()
    {
        string openCloseText = doorController.open ? "Close" : "Open";

        if (LockPickingRequirement == 0)
        {
            miscDisplay.enableDisplay("", "(E) " + openCloseText);
            if (Input.GetKeyDown(KeyCode.E))
            {
                QuestActiveLogic();
                doorController.ActivateDoor();
            }
        }
        else if (playerStats.ReturnNonCombatSkill(SkillsEnum.Larceny) >= LockPickingRequirement)
        {
            miscDisplay.enableDisplay("", "Larceny [" + playerStats.ReturnNonCombatSkill(SkillsEnum.Larceny) + "/" + LockPickingRequirement + "] (E)");
            if (Input.GetKeyDown(KeyCode.E))
            {
                QuestActiveLogic();
                doorController.ActivateDoor();
            }
        }
        else
        {
            miscDisplay.enableDisplay("", "Larceny [" + playerStats.ReturnNonCombatSkill(SkillsEnum.Larceny) + "/" + LockPickingRequirement + "]");
        }
    }
Esempio n. 2
0
    void OnTriggerEnter(Collider other)
    {
        key    = other.GetComponent <Key>();
        puzzle = other.GetComponent <Puzzle>();

        if (key != null || puzzle != null)
        {
            interactableObject = true;
        }

        DoorController keyDoor = other.GetComponent <DoorController>();

        if (keyDoor != null)
        {
            if (ContainsKey(keyDoor.GetDoorType()))
            {
                keyDoor.ActivateDoor();
            }

            if (keyDoor.GetDoorType() == Key.KeyType.Exit && FullCode())
            {
                Debug.Log("Ping");
                movementEnabled = false;
                GetComponentInChildren <MouseLook>().movementEnabled = false;
                overlay.SetActive(false);
                endScreen.SetActive(true);
            }
        }
    }
Esempio n. 3
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        DoorController doorController = (DoorController)target;

        if (GUILayout.Button("Open / Close"))
        {
            doorController.ActivateDoor();
        }
    }