// Update is called once per frame
    void Update()
    {
        xAxis = Input.GetAxisRaw("Horizontal");
        yAxis = Input.GetAxisRaw("Vertical");
        if (xAxis != 0 || yAxis != 0)
        {
            inputDirection = new Vector2(xAxis, yAxis);
            if (inputDirection.x != 0 && inputDirection.y != 0) // Better force of one axis input
            {
                inputDirection.x = 0;
            }
        }
        if (!playerMovement.isMoving && inputDirection != Vector2.zero)
        {
            playerMovement.ChangeFacing(inputDirection);
            tileOfType = playerMovement.CheckCollision(inputDirection, pathMask);
            npcInWay   = playerMovement.CheckCollision(inputDirection, npcMask);
            if (tileOfType != null && npcInWay == null)
            {
                if (tileOfType.walkable)
                {
                    StartCoroutine(playerMovement.Move(inputDirection, moveSpeed));
                    switch (tileOfType.type)
                    {
                    case TileClass.tileType.land:
                        //Nothing
                        break;

                    case TileClass.tileType.grass:
                        //Encounter
                        break;

                    default:
                        break;
                    }
                }
            }
        }
        if (Input.GetButtonDown("Action"))
        {
            string facing = playerMovement.GetFacing();
            switch (facing)
            {
            case "west":
                facingDirection = westFacing;
                break;

            case "north":
                facingDirection = northFacing;
                break;

            case "east":
                facingDirection = eastFacing;
                break;

            case "south":
                facingDirection = southFacing;
                break;

            default:
                facingDirection = northFacing;     //default facing?
                break;
            }
            npcInWay = playerMovement.CheckCollision(facingDirection, npcMask);
            if (npcInWay)
            {
                Interact(facingDirection);
            }
        }
        inputDirection = Vector2.zero;
        if (Input.GetButtonDown("Cancel") && playerMovement.isMoving == false)
        {
            pauseController.ActivatePauseMenu();
        }
    }