// Update is called once per frame void Update() { if (!tutoManaDeleteFlg) { //チューとリアルマネージャの削除 GameObject tutoMana = GameObject.Find("TutorialManager"); if (null != tutoMana) { tutoMana.GetComponent <TutorialManager> ().ClearFlg(); Destroy(tutoMana.gameObject); tutoManaDeleteFlg = true; } } if (!charaInfoDeleteFlg) { //キャラクターインフォの削除 GameObject charaInfo = GameObject.Find("CharactorInfo"); if (null != charaInfo) { charaInfo.GetComponent <CharactorInfo> ().ClearFlg(); Destroy(charaInfo.gameObject); charaInfoDeleteFlg = true; } } if (count >= nextSceneTime) { loadSceneManager.LoadNextScene("Title"); } else { count += Time.deltaTime; } }
private void PlayGame() { loadSceneManager.LoadNextScene(); }
public void PlayGame() { loadSceneManager.LoadNextScene(); }
private void GameEnded() { PlaySound(gameEnd); loadSceneManager.LoadNextScene(); }
// Update is called once per frame void Update() { //debug /*if (Input.GetKeyDown(KeyCode.Space)) * { * GameObject.Find("ResultManager").GetComponent<Result>().StartResult(); * }*/ if (resultFlg) { /// リザルトカメラの配置 /// GameObject resultObject = null; // キャラ情報の取得 resultCharNum = charInfo.GetCharaSelectData(); if (player != null) { switch (resultCharNum) { // タヌキ case CharactorInfo.CHARA.TANUKI: { // リザルトオブジェクトの指定 resultObject = targetObject_Green; // リザルトカメラ位置の指定 resultCamera.transform.position = Green_CameraPos.transform.position; resultCamera.transform.rotation = Green_CameraPos.transform.rotation; // スコア位置の指定 scoreObject.transform.position = Score1.transform.position; scoreObject.transform.rotation = Score1.transform.rotation; break; } // ネコ case CharactorInfo.CHARA.CAT: { // リザルトオブジェクトの指定 resultObject = targetObject_Town; // リザルトカメラ位置の指定 resultCamera.transform.position = Town_CameraPos.transform.position; resultCamera.transform.rotation = Town_CameraPos.transform.rotation; // スコア位置の指定 scoreObject.transform.position = Score2.transform.position; scoreObject.transform.rotation = Score2.transform.rotation; break; } // キツネ case CharactorInfo.CHARA.FOX: { // リザルトオブジェクトの指定 resultObject = targetObject_Sand; // リザルトカメラ位置の指定 resultCamera.transform.position = Sand_CameraPos.transform.position; resultCamera.transform.rotation = Sand_CameraPos.transform.rotation; // スコア位置の指定 scoreObject.transform.position = Score3.transform.position; scoreObject.transform.rotation = Score3.transform.rotation; break; } // イヌ case CharactorInfo.CHARA.DOG: { // リザルトオブジェクトの指定 resultObject = targetObject_Ice; // リザルトカメラ位置の指定 resultCamera.transform.position = Ice_CameraPos.transform.position; resultCamera.transform.rotation = Ice_CameraPos.transform.rotation; // スコア位置の指定 scoreObject.transform.position = Score4.transform.position; scoreObject.transform.rotation = Score4.transform.rotation; break; } default: { break; } } /// プレイヤー情報の保持 // プレイヤースコアの取得 // ←ここでリザルト時のプレイヤーの得点を保持 //score = 777; //プレイヤーから町の総合得点を受け取る serverScore = netConnector.GetLocalPlayer().GetComponent <PlayerSyncScore> ().GetServerScore(); // 得点をリザルト用オブジェクトに加算 GameObject.Find("ResultManager/ResultObjectScore/Canvas").GetComponent <Score>().SetPlusScore(serverScore); /// 不要なオブジェクトの削除 // プレイヤーオブジェクトの削除 Destroy(player); player = null; // リザルトカメラ起動 GameObject.Find("ResultManager").transform.Find("ResultCamera").gameObject.SetActive(true); // Canvasの削除 if (Application.loadedLevelName == "Offline") { if (GameObject.Find("OfflineCanvas") != null) { Destroy(GameObject.Find("OfflineCanvas")); } } else if (Application.loadedLevelName == "Main") { Destroy(GameObject.Find("OnlineCanvas")); } GameObject.Find("PuniconCamera").gameObject.SetActive(false); GameObject.Find("NetworkMissionManager").gameObject.SetActive(false); // NPCの削除 //Destroy(GameObject.Find("NPC")); canvas.gameObject.SetActive(true); } if (count >= nextSceneTime) { netConnector.NetDisconnect(); loadSceneManager.LoadNextScene("Result"); } else { count += Time.deltaTime; } } }