public Dialog1Item GetDialog1ItemByID(Int32 id) { Dialog1Item t = null; p_Dialog1.Dict.TryGetValue(id, out t); if (t == null) { Debug.LogWarning("can't find the id " + id + " in Dialog1"); } return(t); }
public void DialogReduction(int dialogID) { dataManager = new DataManager(); dataManager.LoadAll(); nowDialogueData = dataManager.GetDialog1ItemByID(dialogID); LastDialogueData = dataManager.GetDialog1ItemByID(dialogID - 1); role1Data = dataManager.GetCharactersItemByID(nowDialogueData.role1ID); role2Data = dataManager.GetCharactersItemByID(nowDialogueData.role2ID); //获取指定对话的数据、获取角色1、角色2数据 LoadRole1(); LoadRole2(); //替换了两个角色的图片 LoadSayerName(); //更换了说话者的名字 LoadDialogText(); //更改了文本内容与字号 LoadCG(); LoadBG(); LoadBGM(); //完成了BGM的播放 LoadVoice(); //完成了语音/音效的播放 switch (nowDialogueData.ScreenAnimation) { case 1: //背景震动 ScreenAnimation.DoShake(BGGameObject); break; case 3: //黑屏闪烁 ScreenAnimation.DoBlackTwinkle(FullScreeAnimationGameObject); break; case 4: //白屏闪烁 ScreenAnimation.DoWhiteTwinkle(FullScreeAnimationGameObject); break; } //完成了全屏特效 }