public void LoadNectLevel() { UIMgr.instance.DestoryAllUi(); if (curLevel == LEVEL_NAME.LN_LEVEL10) { curLevel = LEVEL_NAME.LN_START; CommendMgr.instance.emotionlist.Clear(); curLevel = curLevel + 1; curStruct = LevelConfig.levelStructs[(int)curLevel]; UIMgr.instance.GetUI(PrefabPathConfig.MainGameTip); RestartCurLevel(); SceneManager.LoadScene(1); CoreGameMgr.instance.hadDead = false; FindObjectOfType <AnimScript>().sleep(); FindObjectOfType <AnimScript>().changeState(); return; } LEVEL_NAME level = curLevel + 1; curLevel = level; curStruct = LevelConfig.levelStructs[(int)curLevel]; if (curLevel != LEVEL_NAME.LN_START) { UIMgr.instance.GetUI(PrefabPathConfig.MainGameTip); } else { UIMgr.instance.GetUI(PrefabPathConfig.Opening); } //StartCoroutine(_restart()); RestartCurLevel(); AnimPlay.instance.PlayInScene(); }
public void LoadLevel(LEVEL_NAME level) { SceneManager.LoadScene((int)level); curLevel = level; if (level == LEVEL_NAME.LN_LEVEL4) { AudioPlayMgr.instance.PlayBGM(1); } if (level == LEVEL_NAME.LN_LEVEL7) { AudioPlayMgr.instance.PlayBGM(2); } if (level == LEVEL_NAME.LN_LEVEL10) { AudioPlayMgr.instance.PlayBGM(3); } }