IEnumerator LoadSceneAsync(GameModeData.GAMEMODE next) { // フェードアウトしてから GameFadeManager.Instance.StartFade(GameFadeManager.FadeType.FADE_OUT, 30); while (GameFadeManager.Instance.IsFade()) { yield return(null); } // シーンの非同期読み込み string sceneName = GameResourcePath.GetSceneName(next); AsyncOperation asyncOP = SceneManager.LoadSceneAsync(sceneName); while (!asyncOP.isDone) { yield return(null); } GameModeData.ChangeGameMode(next); // フェードイン GameFadeManager.Instance.StartFade(GameFadeManager.FadeType.FADE_IN, 30); while (GameFadeManager.Instance.IsFade()) { yield return(null); } m_bLoad = false; }
// Use this for initialization //--------------------------------------------------------------- /* * @breif 初期化処理 */ //--------------------------------------------------------------- void Start() { updater = GameSceneManager.Instance.GetSceneUpdater() as UpdateStage; // RigidBodyの取得 rb = GetComponent <Rigidbody>(); rb.freezeRotation = true; rb.useGravity = true; rb.isKinematic = false; m_camera = null; if (updater) { m_camera = updater.CameraMngr.GetCurrentCameraComponent(); } m_VRCameraRoot = GameObject.Find("VRCameraRoot"); yaw = 0.0f; m_gravity = BASE_GRAVITY; m_vectorToMove = Vector3.zero; m_StartPos = transform.position; m_StartRot = transform.rotation; bBlowOff = false; audioSource = GetComponent <AudioSource>(); GameObject rocket = (GameObject)Instantiate(Resources.Load(GameResourcePath.GetRocketPath()), transform.position, transform.rotation); EquipItem(rocket); GameObject weight = (GameObject)Instantiate(Resources.Load(GameResourcePath.GetWeightPath()), transform.position, transform.rotation); EquipItem(weight); elapsedTime = 0; rocketRot = 180.0f; m_bCorrectX = false; m_diffX = 0.0f; m_bGoal = false; m_bGameOver = false; SetMoveMode(ACTION_MODE.ACT_MODE_BLOWOFF); }