// Update is called once per frame
    void Update()
    {
        if (dead)
        {
            rb.velocity = new Vector3(0, 0, 0);

            return;
        }

        hunger -= (Time.deltaTime * 0.15f);
        thirst -= (Time.deltaTime * 0.3f);
        // hunger -= (Time.deltaTime * 5);

        if (hunger < 0)
        {
            hunger  = 0;
            health -= Time.deltaTime * 0.75f;

            // health -= (Time.deltaTime * 1);
            Game.instance.playerStatus.UpdateHealth();
        }

        if (thirst < 0)
        {
            thirst  = 0;
            health -= Time.deltaTime * 0.1f;

            // health -= (Time.deltaTime * 1);
            Game.instance.playerStatus.UpdateHealth();
        }

        if (hunger > 90 && health < maxHealth)
        {
            health += Time.deltaTime * 0.5f;

            Game.instance.playerStatus.UpdateHealth();
        }

        if (health <= 0)
        {
            Die();
        }

        Game.instance.playerStatus.UpdateHunger();
        Game.instance.playerStatus.UpdateThirst();

        if (Game.instance.mapGenerated && !spawned)
        {
            Game.SpawnObject(gameObject, transform.position + new Vector3(0, 0, 1));
            Game.SpawnObject(Game.instance.sled.gameObject, transform.position + new Vector3(0, 0, 6));

            for (int i = 0; i < 5; i++)
            {
                GameObject newDog = (GameObject)Instantiate(Game.instance.dogPrefab, Vector3.zero, new Quaternion(0, 0, 0, 0));
                Game.SpawnObject(newDog, transform.position + new Vector3(Random.Range(-6.0f, 6.0f), 0, Random.Range(-6.0f, 6.0f)));
            }

            spawned = true;
        }

        // Inventory Button
        if (Input.GetKeyDown("e"))
        {
            if (Game.instance.inventoryMenu.activeSelf)
            {
                inventory.Close();
            }
            else
            {
                inventory.Open();
            }
        }

        if (Input.GetKeyDown(KeyCode.Tab))
        {
            if (Game.instance.playerStatus.gameObject.activeSelf)
            {
                Game.instance.playerStatus.CloseMenu();
            }
            else
            {
                Game.instance.playerStatus.OpenMenu();
            }
        }

        if (Input.GetKeyDown("enter") || Input.GetKeyDown("return"))
        {
            ActionButton();
        }

        if (Input.GetMouseButtonDown(0))
        {
            if (heldItem != null && !Game.instance.inventoryMenu.activeSelf)
            {
                heldItem.LeftClick();
            }
        }
        else if (Input.GetMouseButtonDown(1))
        {
            if (heldItem != null && !Game.instance.inventoryMenu.activeSelf)
            {
                heldItem.RightClick();
            }
        }

        Collider[] colliders   = Physics.OverlapSphere(transform.position, 0.25f);
        bool       checkGround = false;

        foreach (Collider col in colliders)
        {
            if (col.tag == "Ground")
            {
                checkGround = true;
            }
        }

        grounded = checkGround;

        if (!underWater && transform.position.y < 51)
        {
            underWater = true;
            Game.ToggleWater();
        }

        if (underWater && transform.position.y >= 51)
        {
            underWater = false;
            Game.ToggleWater();
        }

        if (!thirstRange && transform.position.y < 52.2f)
        {
            thirstRange = true;
            SetActionButton(ActionButtons.DrinkWater, null);
        }

        if (thirstRange && transform.position.y >= 52.2f)
        {
            thirstRange = false;
            SetActionButton(ActionButtons.None, null);
        }
    }