public void EndGame()
 {
     this.inGame = false;
     Koma_Rotate.EndRotate();
     Player_Move.EndGame();
     SceneManager.LoadScene("MainScene");
 }
 private void FixedUpdate()
 {
     if (inGame)
     {
         if (isGrabbing)
         {
             GameManager.Instance.StartGame();
             Koma_Rotate.StartRotate();
             inGame = false;
         }
     }
 }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            RaycastHit hit;
            if (Physics.Raycast(ray, out hit, Mathf.Infinity))
            {
                if (hit.collider.tag == "Obi")
                {
                    isGrabbing = true;
                    cube       = hit.transform;
                }
            }
        }


        if (!inGame)
        {
            transform.Translate(-0.5f, 0, 0);
            Koma_Rotate.StartRotate();
        }


        /*
         * if (isGrabbing)
         * {
         *  Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         *  float rayDistance;
         *  plane.Raycast(ray, out rayDistance);
         *
         *  cube.position = ray.GetPoint(rayDistance);
         *
         *  if (Input.GetMouseButtonUp(0))
         *  {
         *      isGrabbing = false;
         *  }
         * }
         */
    }
    private void Awake()
    {
        Application.targetFrameRate = 60;

        bool titleSceneLoaded = false;

        foreach (Scene s in SceneManager.GetAllScenes())
        {
            if (s.name == "TitleScene")
            {
                titleSceneLoaded = true;
            }
        }
        if (!titleSceneLoaded)
        {
            SceneManager.LoadScene("TitleScene", LoadSceneMode.Additive);
        }

        Koma_Rotate.EndRotate();
        Player_Move.EndGame();
    }