private void DrawYure() { GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Label("揺れボーン", UIParams.Instance.lStyle, new GUILayoutOption[0]); GUILayout.FlexibleSpace(); bool flag = !YureUtil.GetYureAble(CommonUIData.maid, CommonUIData.slotNo); if (flag) { GUI.enabled = false; GUILayout.Toggle(false, "", UIParams.Instance.tStyle, new GUILayoutOption[0]); GUI.enabled = true; } else { bool yureState = YureUtil.GetYureState(CommonUIData.maid, CommonUIData.slotNo); bool flag2 = GUILayout.Toggle(yureState, "", UIParams.Instance.tStyle, new GUILayoutOption[0]); bool flag3 = flag2 != yureState; if (flag3) { YureUtil.SetYureState(CommonUIData.maid, CommonUIData.slotNo, flag2); BackUpObjectData orAddMaidObjectData = BackUpData.GetOrAddMaidObjectData(CommonUIData.maid, CommonUIData.slotNo, CommonUIData.obj); bool flag4 = orAddMaidObjectData.changedYure && flag2 == orAddMaidObjectData.bYure; if (flag4) { bool flag5 = orAddMaidObjectData.boneDataDic.Count == 0; if (flag5) { BackUpSlotData orNullMaidSlotData = BackUpData.GetOrNullMaidSlotData(CommonUIData.maid, CommonUIData.slotNo); orNullMaidSlotData.objectDataDic.Remove(CommonUIData.obj); } else { orAddMaidObjectData.changedYure = false; } BackUpData.Refresh(); } else { orAddMaidObjectData.changedYure = true; orAddMaidObjectData.bYure = yureState; } } } GUILayout.EndHorizontal(); }
private static void SetMaidObjectData(Maid maid, int slotID, XElement objectXml) { bool flag = slotID == -1; GameObject gameObject; if (flag) { TBodySkin tbodySkin = maid.body0.goSlot[0]; gameObject = maid.body0.m_Bones.gameObject; } else { TBodySkin tbodySkin = maid.body0.GetSlot(slotID); gameObject = tbodySkin.obj; } XElement xelement = objectXml.Element("Yure"); bool flag2 = xelement != null; if (flag2) { bool flag3 = (bool)xelement; bool yureAble = YureUtil.GetYureAble(maid, slotID); if (yureAble) { bool flag4 = YureUtil.GetYureState(maid, slotID) != flag3; if (flag4) { BackUpObjectData orAddMaidObjectData = BackUpData.GetOrAddMaidObjectData(maid, slotID, gameObject); bool changedYure = orAddMaidObjectData.changedYure; if (changedYure) { orAddMaidObjectData.changedYure = false; orAddMaidObjectData.bYure = true; } else { orAddMaidObjectData.changedYure = true; orAddMaidObjectData.bYure = YureUtil.GetYureState(maid, slotID); } YureUtil.SetYureState(maid, slotID, flag3); } } } IEnumerable <XElement> enumerable = objectXml.Elements("TransformData"); bool flag5 = enumerable != null; if (flag5) { foreach (XElement xelement2 in enumerable) { XElement xelement3 = xelement2.Element("Name"); bool flag6 = xelement3 == null; if (flag6) { break; } bool flag7 = slotID == -1; Transform transform; if (flag7) { transform = CMT.SearchObjName(gameObject.transform, (string)xelement3, true); } else { transform = CMT.SearchObjName(gameObject.transform, (string)xelement3, false); } bool flag8 = transform == null; if (!flag8) { BackUpBoneData orAddMaidBoneData = BackUpData.GetOrAddMaidBoneData(maid, slotID, gameObject, transform); XElement xelement4 = xelement2.Element("Scale"); bool flag9 = xelement4 != null; if (flag9) { bool flag10 = !orAddMaidBoneData.changedScl; if (flag10) { orAddMaidBoneData.changedScl = true; orAddMaidBoneData.scale = transform.localScale; } Vector3 vectorData = SceneDataManager.GetVectorData(xelement4); transform.localScale = vectorData; } XElement xelement5 = xelement2.Element("Position"); bool flag11 = xelement5 != null; if (flag11) { bool flag12 = !orAddMaidBoneData.changedPos; if (flag12) { orAddMaidBoneData.changedPos = true; orAddMaidBoneData.position = transform.localPosition; } Vector3 vectorData2 = SceneDataManager.GetVectorData(xelement5); transform.localPosition = vectorData2; } XElement xelement6 = xelement2.Element("Rotation"); bool flag13 = xelement6 != null; if (flag13) { bool flag14 = !orAddMaidBoneData.changedRot; if (flag14) { orAddMaidBoneData.changedRot = true; orAddMaidBoneData.rotation = transform.localRotation; } Vector3 vectorData3 = SceneDataManager.GetVectorData(xelement6); transform.localEulerAngles = vectorData3; } } } } }