Ejemplo n.º 1
0
    public override void DoInteraction(bool sentFromPlayerInput = false)
    {
        CheckInteraction();

        if (!_canContinue)
        {
            return;
        }

        GameSaveController.SaveGame(InteractableID);
    }
    private void Update()
    {
        AnimateOverworldCharacter();

        switch (State)
        {
        case PlayerState.Active:
            if (Input.GetButtonDown("Submit"))
            {
                TryInteract();
            }
            if (Input.GetButtonDown("Cancel"))
            {
                OpenMainMenu();
            }
            break;

        case PlayerState.Busy:
            break;
        }

        //test
#if UNITY_EDITOR
        if (Input.GetKeyDown(KeyCode.LeftShift))
        {
            MovementSpeed = 10;
        }
        if (Input.GetKeyUp(KeyCode.LeftShift))
        {
            MovementSpeed = 5;
        }
        if (Input.GetKeyDown(KeyCode.Z))
        {
            GameSaveController.Save();
        }
        if (Input.GetKeyDown(KeyCode.X))
        {
            GameSaveController.Load();
        }
        if (Input.GetKeyDown(KeyCode.Q))
        {
            _toggleMinimapCamera();
        }
#endif
    }