void Start() { //最开始的界面做过这一步了,但是如果不是从start进入这个场景或者在这之前没有进入过start场景 //就需要做这一步 //实际上是加载 CGModeFile.makeAllStart(); CGNameForGroup1 = new List <string> (); for (int i = 0; i < CGModeFile.theCG1.Count; i++) { CGNameForGroup1.Add(CGModeFile.theCG1[i].CGFileName); } CGNameForGroup2 = new List <string> (); for (int i = 0; i < CGModeFile.theCG2.Count; i++) { CGNameForGroup2.Add(CGModeFile.theCG2[i].CGFileName); } CGNameForGroup3 = new List <string> (); for (int i = 0; i < CGModeFile.theCG3.Count; i++) { CGNameForGroup3.Add(CGModeFile.theCG3[i].CGFileName); } makeCGSelectButton(3); }
void makeStart() { theAudioGetter.playerSource(); //DarkStarter.gameObject.SetActive (false); //这里有一个渐变的效果,这个原先是是一个直接关闭 //花上两秒的时间渐入时间有一点长了 DarkStarter.GetComponent <effectSlowIn>().makeChangeOut(1.25f); UIUseRoot.gameObject.SetActive(true); theStartSceneEffect.SetActive(true); //没有必要做这一步,当然求稳健的话是可以的 //theAudioSource.gameObject.SetActive (true); theAudioSource.Play(); theAudioSource.loop = true; if (!isStarted) { //以下功能关乎文件,但是很多东西都被保存在了静态变量中 //所以从文件进行初始化的功能只在最开始的时候做一次就可以了 configController.createConfigFileIfNull(); //如果没有配置文件就建立默认的配置文件 SceneModeFile.InitValues(); CGModeFile.makeAllStart(); //生成CG文件 DeathFile.makeAllStart(); systemInformations.makeOlotOverAllCount(); //获得总剧本长度 systemInformations.LoadPlotOver(); extraHFile.makeAllStart(); //额外特典标记 } systemInformations.flash(); //默认回到初始界面时间scale变回原状 isStarted = true; isStartedThisTurn = true; Invoke("trueStart", 1.5f); }