public bool Proc(AnimatorStateInfo _ai) { if (this.oldHash != ((AnimatorStateInfo) ref _ai).get_shortNameHash()) { this.oldFrame = 0.0f; } this.oldHash = ((AnimatorStateInfo) ref _ai).get_shortNameHash(); for (int index1 = 0; index1 < this.lstPaste.Count; ++index1) { this.p = this.lstPaste[index1]; if (((AnimatorStateInfo) ref _ai).IsName(this.p.anim)) { float num = ((AnimatorStateInfo) ref _ai).get_normalizedTime() % 1f; this.ti = this.p.timing; if ((double)this.oldFrame <= (double)this.ti.normalizeTime && (double)this.ti.normalizeTime < (double)num) { for (int index2 = 0; index2 < this.ti.lstWhere.Count; ++index2) { this.sp = (ChaFileDefine.SiruParts) this.ti.lstWhere[index2]; this.chaFemale.SetSiruFlag(this.sp, (byte)Mathf.Clamp((int)this.chaFemale.GetSiruFlag(this.sp) + 1, 0, 2)); } } } } this.oldFrame = ((AnimatorStateInfo) ref _ai).get_normalizedTime(); return(true); }
public bool Load(string _assetpath, string _file, int _id) { this.lstPaste.Clear(); if (_file == string.Empty) { return(false); } List <string> nameListFromPath = CommonLib.GetAssetBundleNameListFromPath(_assetpath, false); nameListFromPath.Sort(); this.asset.Clear(); this.asset.Append(_file); this.excelData = (ExcelData)null; for (int index1 = 0; index1 < nameListFromPath.Count; ++index1) { this.abName.Clear(); this.abName.Append(nameListFromPath[index1]); if (GlobalMethod.AssetFileExist(this.abName.ToString(), this.asset.ToString(), string.Empty)) { this.excelData = CommonLib.LoadAsset <ExcelData>(this.abName.ToString(), this.asset.ToString(), false, string.Empty); Singleton <HSceneManager> .Instance.hashUseAssetBundle.Add(this.abName.ToString()); if (!Object.op_Equality((Object)this.excelData, (Object)null)) { int num1 = 1; while (num1 < this.excelData.MaxCell) { this.row = this.excelData.list[num1++].list; int num2 = 1; SiruPasteCtrl.PasteInfo pasteInfo1 = new SiruPasteCtrl.PasteInfo(); SiruPasteCtrl.PasteInfo pasteInfo2 = pasteInfo1; List <string> row1 = this.row; int index2 = num2; int num3 = index2 + 1; string element = row1.GetElement <string>(index2); pasteInfo2.anim = element; pasteInfo1.timing = new SiruPasteCtrl.Timing(); SiruPasteCtrl.Timing timing = pasteInfo1.timing; List <string> row2 = this.row; int index3 = num3; int num4 = index3 + 1; double num5 = (double)float.Parse(row2.GetElement <string>(index3)); timing.normalizeTime = (float)num5; List <string> row3 = this.row; int index4 = num4; int num6 = index4 + 1; this.astr = row3.GetElement <string>(index4).Split(','); for (int index5 = 0; index5 < this.astr.Length; ++index5) { int result = 0; if (!int.TryParse(this.astr[index5], out result)) { result = 0; } pasteInfo1.timing.lstWhere.Add(result); } this.lstPaste.Add(pasteInfo1); } } } } this.oldFrame = 0.0f; this.oldHash = 0; return(true); }