// Update is called once per frame
    void Update()
    {
        StaminaImg.sprite = StaminaType[mainSceneManager.MyStamina];

        if (mainSceneManager.MyStamina == 5)
        {
            StaminCountText.text = "  Max";
        }
        else
        {
            if (StaminaUpCount < 10)
            {
                StaminCountText.text = "00:0" + ((int)StaminaUpCount).ToString();
            }
            else
            {
                StaminCountText.text = "00:" + ((int)StaminaUpCount).ToString();
            }
        }
        if (mainSceneManager.MyStamina != 5)
        {
            StaminaUpCount -= Time.deltaTime;
            if (StaminaUpCount < 0)
            {
                mainSceneManager.MyStamina++;
                StaminaUpCount = 59;
                mainSceneManager.SaveJsonData();
            }
            mainSceneManager.MyStaminaTime = (int)StaminaUpCount;
        }
    }