public bool Init() { blendTimeCtrl = new TimeProgressCtrl(0.15f); blendTimeCtrl.End(); for (int i = 0; i < FBSTarget.Length; i++) { FBSTarget[i].SetSkinnedMeshRenderer(); } dictBackFace.Clear(); dictBackFace[0] = 1f; dictNowFace.Clear(); dictNowFace[0] = 1f; return(true); }
public void ChangeFace(Dictionary <int, float> dictFace, bool blend) { bool flag = false; byte b = 0; float num = 0f; FBSTargetInfo[] fBSTarget = FBSTarget; int num2 = 0; while (num2 < fBSTarget.Length) { FBSTargetInfo fBSTargetInfo = fBSTarget[num2]; SkinnedMeshRenderer skinnedMeshRenderer = fBSTargetInfo.GetSkinnedMeshRenderer(); foreach (int key in dictFace.Keys) { if (skinnedMeshRenderer.sharedMesh.blendShapeCount <= fBSTargetInfo.PtnSet[key].Close) { b = 1; break; } if (skinnedMeshRenderer.sharedMesh.blendShapeCount <= fBSTargetInfo.PtnSet[key].Open) { b = 1; break; } num += dictFace[key]; } if (b != 0) { break; } if (flag || !(num > 1f)) { flag = true; num2++; continue; } b = 2; break; } switch (b) { case 1: Debug.LogError("ブレンドシェイプ番号が範囲外"); break; case 2: Debug.LogError("合成の割合が100%を超えています"); break; default: dictBackFace.Clear(); foreach (int key2 in dictNowFace.Keys) { dictBackFace[key2] = dictNowFace[key2]; } dictNowFace.Clear(); foreach (int key3 in dictFace.Keys) { dictNowFace[key3] = dictFace[key3]; } if (!blend) { blendTimeCtrl.End(); } else { blendTimeCtrl.Start(); } break; } }
// Token: 0x06008677 RID: 34423 RVA: 0x0034A14C File Offset: 0x0034854C public void ChangeFace(Dictionary <int, float> dictFace, bool blend) { var flag = false; byte b = 0; var num = 0f; foreach (var fbstargetInfo in FBSTarget) { var skinnedMeshRenderer = fbstargetInfo.GetSkinnedMeshRenderer(); foreach (var num2 in dictFace.Keys) { if (skinnedMeshRenderer.sharedMesh.blendShapeCount <= fbstargetInfo.PtnSet[num2].Close) { b = 1; break; } if (skinnedMeshRenderer.sharedMesh.blendShapeCount <= fbstargetInfo.PtnSet[num2].Open) { b = 1; break; } num += dictFace[num2]; } if (b != 0) { break; } if (!flag && num > 1f) { b = 2; break; } flag = true; } if (b == 1) { return; } if (b == 2) { return; } dictBackFace.Clear(); foreach (var key in dictNowFace.Keys) { dictBackFace[key] = dictNowFace[key]; } dictNowFace.Clear(); foreach (var key2 in dictFace.Keys) { dictNowFace[key2] = dictFace[key2]; } if (!blend) { blendTimeCtrl.End(); } else { blendTimeCtrl.Start(); } }