示例#1
0
    public CharactersItem GetCharactersItemByID(Int32 id)
    {
        CharactersItem t = null;

        p_Characters.Dict.TryGetValue(id, out t);
        if (t == null)
        {
            Debug.LogWarning("can't find the id " + id + " in Characters");
        }
        return(t);
    }
示例#2
0
    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;
        }
        //完成了全屏特效
    }