// Update is called once per frame void Update() { switch (ModeSelect) { case "ReStart": if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow)) { ModeSelect = "Title"; } if (FadePanel.AlphaGet() > 1.0f) { FloorCount.ResetCount(); SceneManager.LoadScene("GameScene"); } RGame.GetComponent <SelectMode>().ColorChange(ModeSelect); break; case "Title": if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow)) { ModeSelect = "ReStart"; } if (FadePanel.AlphaGet() > 1.0f) { FloorCount.ResetCount(); SceneManager.LoadScene("TitleScene"); } RTitle.GetComponent <SelectMode>().ColorChange(ModeSelect); break; } }
private static bool isMerge = false; //シーン統合フラグ void Start() { FloorCount.SetReset(); SceneManager.LoadScene("MapScene", LoadSceneMode.Additive); SceneManager.LoadScene("PlayerScene", LoadSceneMode.Additive); // SceneManager.LoadScene("EnemyScene", LoadSceneMode.Additive); // // SceneManager.LoadScene("EnemyScene", LoadSceneMode.Additive); // //SceneManager.LoadScene("SkillScene", LoadSceneMode.Additive); //SceneManager.LoadScene("WeaponScene", LoadSceneMode.Additive); isMerge = true; //現在読み込まれているシーン数だけループ for (int i = 0; i < UnityEngine.SceneManagement.SceneManager.sceneCount; i++) { //読み込まれているシーンを取得し、その名前をログに表示 string sceneName = UnityEngine.SceneManagement.SceneManager.GetSceneAt(i).name; if (sceneName == "GameScene") { CameraSeter = true; break; } } }
void Awake() { if (hud_Instance == null) { hud_Instance = this; } else if (hud_Instance != this) { Destroy(this.gameObject); } DontDestroyOnLoad(GameObject.Find("Hud_canvas")); }
// Start is called before the first frame update void Start() { text = this.GetComponent <Text>(); text.text = "You Have Reached " + FloorCount.GetFloors() + " Floors"; }