Пример #1
0
 private static void loadListInternal(this ChaListControl instance, Dictionary <int, ListInfoBase> dictData, ChaListData chaListData)
 {
     foreach (KeyValuePair <int, List <string> > keyValuePair in chaListData.dictList)
     {
         ListInfoBase listInfoBase = new ListInfoBase();
         if (listInfoBase.Set(chaListData.categoryNo, chaListData.distributionNo, chaListData.lstKey, keyValuePair.Value))
         {
             if (!dictData.ContainsKey(listInfoBase.Id))
             {
                 dictData[listInfoBase.Id] = listInfoBase;
                 int infoInt = listInfoBase.GetInfoInt(ChaListDefine.KeyType.Possess);
                 int item    = (listInfoBase.Category * CategoryMultiplier) + listInfoBase.Id;
                 if (infoInt == 1)
                 {
                     var lstItemIsInit = r_lstItemIsInit.GetValue <List <int> >(instance);
                     lstItemIsInit.Add(item);
                 }
                 else if (infoInt == 2)
                 {
                     var lstItemIsNew = r_lstItemIsNew.GetValue <List <int> >(instance);
                     lstItemIsNew.Add(item);
                 }
             }
         }
     }
 }
Пример #2
0
        internal static void loadListInternal(this ChaListControl instance, Dictionary <int, ListInfoBase> dictData, ChaListData chaListData)
        {
            foreach (KeyValuePair <int, List <string> > keyValuePair in chaListData.dictList)
            {
                ListInfoBase listInfoBase = new ListInfoBase();

                if (listInfoBase.Set(chaListData.categoryNo, chaListData.distributionNo, chaListData.lstKey, keyValuePair.Value))
                {
                    if (!dictData.ContainsKey(listInfoBase.Id))
                    {
                        dictData[listInfoBase.Id] = listInfoBase;
                        int infoInt = listInfoBase.GetInfoInt(ChaListDefine.KeyType.Possess);
                        int item    = CalculateGlobalID(listInfoBase.Category, listInfoBase.Id);
                        instance.AddItemID(item, (byte)infoInt);
                    }
                }
            }
        }
Пример #3
0
        public void PlayVoice()
        {
            if (!this.customBase.playVoiceBackup.playSampleVoice)
            {
                this.customBase.playVoiceBackup.backEyebrowPtn = this.chaCtrl.fileStatus.eyebrowPtn;
                this.customBase.playVoiceBackup.backEyesPtn    = this.chaCtrl.fileStatus.eyesPtn;
                this.customBase.playVoiceBackup.backBlink      = this.chaCtrl.fileStatus.eyesBlink;
                this.customBase.playVoiceBackup.backEyesOpen   = this.chaCtrl.fileStatus.eyesOpenMax;
                this.customBase.playVoiceBackup.backMouthPtn   = this.chaCtrl.fileStatus.mouthPtn;
                this.customBase.playVoiceBackup.backMouthFix   = this.chaCtrl.fileStatus.mouthFixed;
                this.customBase.playVoiceBackup.backMouthOpen  = this.chaCtrl.fileStatus.mouthOpenMax;
            }
            ListInfoBase listInfo = Singleton <Character> .Instance.chaListCtrl.GetListInfo(ChaListDefine.CategoryNo.cha_sample_voice, this.parameter.personality);

            if (listInfo == null)
            {
                return;
            }
            ChaListDefine.KeyType[] keyTypeArray1 = new ChaListDefine.KeyType[3]
            {
                ChaListDefine.KeyType.Eyebrow01,
                ChaListDefine.KeyType.Eyebrow02,
                ChaListDefine.KeyType.Eyebrow03
            };
            ChaListDefine.KeyType[] keyTypeArray2 = new ChaListDefine.KeyType[3]
            {
                ChaListDefine.KeyType.Eye01,
                ChaListDefine.KeyType.Eye02,
                ChaListDefine.KeyType.Eye03
            };
            ChaListDefine.KeyType[] keyTypeArray3 = new ChaListDefine.KeyType[3]
            {
                ChaListDefine.KeyType.EyeMax01,
                ChaListDefine.KeyType.EyeMax02,
                ChaListDefine.KeyType.EyeMax03
            };
            ChaListDefine.KeyType[] keyTypeArray4 = new ChaListDefine.KeyType[3]
            {
                ChaListDefine.KeyType.Mouth01,
                ChaListDefine.KeyType.Mouth02,
                ChaListDefine.KeyType.Mouth03
            };
            ChaListDefine.KeyType[] keyTypeArray5 = new ChaListDefine.KeyType[3]
            {
                ChaListDefine.KeyType.MouthMax01,
                ChaListDefine.KeyType.MouthMax02,
                ChaListDefine.KeyType.MouthMax03
            };
            ChaListDefine.KeyType[] keyTypeArray6 = new ChaListDefine.KeyType[3]
            {
                ChaListDefine.KeyType.EyeHiLight01,
                ChaListDefine.KeyType.EyeHiLight02,
                ChaListDefine.KeyType.EyeHiLight03
            };
            ChaListDefine.KeyType[] keyTypeArray7 = new ChaListDefine.KeyType[3]
            {
                ChaListDefine.KeyType.Data01,
                ChaListDefine.KeyType.Data02,
                ChaListDefine.KeyType.Data03
            };
            int index = this.voiceCnt[this.parameter.personality] = (this.voiceCnt[this.parameter.personality] + 1) % keyTypeArray1.Length;

            this.chaCtrl.ChangeEyebrowPtn(listInfo.GetInfoInt(keyTypeArray1[index]), true);
            this.chaCtrl.ChangeEyesPtn(listInfo.GetInfoInt(keyTypeArray2[index]), true);
            this.chaCtrl.HideEyeHighlight("0" == listInfo.GetInfo(keyTypeArray6[index]));
            this.chaCtrl.ChangeEyesBlinkFlag(false);
            this.chaCtrl.ChangeEyesOpenMax(listInfo.GetInfoFloat(keyTypeArray3[index]));
            this.chaCtrl.ChangeMouthPtn(listInfo.GetInfoInt(keyTypeArray4[index]), true);
            this.chaCtrl.ChangeMouthFixed(false);
            this.chaCtrl.ChangeMouthOpenMax(listInfo.GetInfoFloat(keyTypeArray5[index]));
            this.customBase.playVoiceBackup.playSampleVoice = true;
            Singleton <Manager.Sound> .Instance.Stop(Manager.Sound.Type.SystemSE);

            Transform trfVoice = Illusion.Game.Utils.Sound.Play(new Illusion.Game.Utils.Sound.Setting()
            {
                type            = Manager.Sound.Type.SystemSE,
                assetBundleName = listInfo.GetInfo(ChaListDefine.KeyType.MainAB),
                assetName       = listInfo.GetInfo(keyTypeArray7[index])
            });

            this.audioSource = (AudioSource)((Component)trfVoice).GetComponent <AudioSource>();
            this.audioSource.set_pitch(this.parameter.voicePitch);
            this.chaCtrl.SetVoiceTransform(trfVoice);
        }