// Update is called once per frame
    void Update()
    {
        if (IfGameStart && !gameover)
        {
            if (Input.GetButtonDown("SystemPause"))
            {
                if (!st.IfSystemPause)
                {
                    Debug.Log("Pause");
                    UIManager.Instance.ShowDesPanel("停止中");
                    st.gamestop(StopSystem.PauseState.SystemPause);
                }
                else
                {
                    UIManager.Instance.menuPanel.SetActive(false);
                    st.gamestop(StopSystem.PauseState.Resume);
                }
            }
        }


        if (ghostEnable)
        {
            distance_ghost_to_thief  = getXZDistance(ght.gameObject, tf.gameObject);
            distance_player_to_ghost = getXZDistance(pc.gameObject, ght.gameObject);
        }

        distance_player_to_thief = getXZDistance(pc.gameObject, tf.gameObject);
        if (!gameover)
        {
            //終了チェック
            EndCheck();

            //宝が盗まれたらモデルをHideする
            if (tf.thiefState == Thief.ThiefState.HEAD_EXIT && swordlight != null)
            {
                treasure.GetComponent <treasure>().sword.SetActive(false);
                swordlight.Stop();
                swordlight.Clear();
            }
        }
        else
        {
            //ゲームオーバー処理
            st.gamestop(StopSystem.PauseState.Normal);
            pc.CanPlayerMove = false;
            if (st.canStop)
            {
                st.canStop = false;
            }
            if (!iestart)
            {
                StartCoroutine(ie());
            }
        }
    }
 /// <summary>
 /// 説明文UIの展開と収縮関数です //オウカンウ
 /// </summary>
 /// <param name="ギミックのCSVファイル中の名前"></param>
 protected void ShowDescription(string name)
 {
     if (descriptionUIOn || st.SecondPhase)
     {
         return;
     }
     LoadDescription.Instance.ShowDesc(name);
     descriptionUIOn = true;
     st.gamestop(StopSystem.PauseState.DescriptionOpen);
     gimmickUIParent.GetComponent <DescriptionUIChange>().DescriptionOnOff();
 }