|
@@ -24,14 +24,11 @@ namespace MetaClient
|
|
|
{
|
|
|
GameEntry.Event.Subscribe(CustomRoleBodyEventArgs.EventId, UpdateBody);
|
|
|
|
|
|
- //bodyData = new RoleCustomData();
|
|
|
- //bodyData.bonePos = new int[6];
|
|
|
- //bodyData.boneScale = new float[6];
|
|
|
- //for (int i = 0; i < 6; i++)
|
|
|
- //{
|
|
|
- // bodyData.bonePos[i] = i;
|
|
|
- // bodyData.boneScale[i] = 1;
|
|
|
- //}
|
|
|
+ bodyData = new RoleCustomData();
|
|
|
+ for (int i = 0; i < 6; i++)
|
|
|
+ {
|
|
|
+ bodyData.bodyList.Add(i, new PartData((EditableBodyPart)i, ModifyType.LengthWidthThick));
|
|
|
+ }
|
|
|
|
|
|
//CustomRoleUtility.ShowFile();
|
|
|
|
|
@@ -48,22 +45,17 @@ namespace MetaClient
|
|
|
CustomRoleBodyEventArgs crf = (CustomRoleBodyEventArgs)e;
|
|
|
if (crf != null)
|
|
|
{
|
|
|
- //bodyData.boneScale[(int)crf.Part] = 1 + (crf.ChangeValue.x - 0.5f) * valueFloating;
|
|
|
- //if (testPlayer == null)
|
|
|
- //{
|
|
|
- // testPlayer = GameObject.Find("mu").GetComponent<CustomRoleController>();
|
|
|
- //}
|
|
|
- //if (testPlayer != null)
|
|
|
- //{
|
|
|
- // testPlayer.UpdateBoneScale(crf.Part, bodyData.boneScale[(int)crf.Part]);
|
|
|
- //}
|
|
|
+ bodyData.bodyList[(int)crf.Part].floatValue = 1 + (crf.ChangeValue.x - 0.5f) * valueFloating;
|
|
|
+ if (testPlayer != null)
|
|
|
+ {
|
|
|
+ testPlayer.UpdateBoneScale(crf.Part, bodyData.bodyList[(int)crf.Part].floatValue);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public float GetBodyBoneValue(EditableBodyPart part)
|
|
|
{
|
|
|
- //return 0.5f + (bodyData.boneScale[(int)part] - 1) / valueFloating;
|
|
|
- return 0;
|
|
|
+ return 0.5f + (bodyData.bodyList[(int)part].floatValue - 1) / valueFloating;
|
|
|
}
|
|
|
}
|
|
|
}
|