|
@@ -394,27 +394,31 @@ public class Player : Regist , IPointerClickHandler
|
|
|
private string Dress;
|
|
|
private string Mouse;
|
|
|
private string HeadWear;
|
|
|
+// private string LeftLongSleeve;
|
|
|
+// private string LeftShortSleeve;
|
|
|
+// private string RightLongSleeve;
|
|
|
+// private string RightShortSleeve;
|
|
|
private string TempClose;
|
|
|
|
|
|
- public DragonBones.Slot NeckSlot;
|
|
|
- public DragonBones.Slot LeftHandSlot;
|
|
|
- public DragonBones.Slot RightHandSlot;
|
|
|
- public DragonBones.Slot LeftLegSlot;
|
|
|
- public DragonBones.Slot RightLegSlot;
|
|
|
- public DragonBones.Slot LeftLongSleeveSlot;
|
|
|
- public DragonBones.Slot LeftShortSleeveSlot;
|
|
|
- public DragonBones.Slot RightLongSleeveSlot;
|
|
|
- public DragonBones.Slot RightShortSleeveSlot;
|
|
|
-
|
|
|
- public DragonBones.Slot EyeSlot;
|
|
|
- public DragonBones.Slot TopSlot;
|
|
|
- public DragonBones.Slot HeadSlot;
|
|
|
- public DragonBones.Slot DressSlot;
|
|
|
- public DragonBones.Slot WingSlot;
|
|
|
- public DragonBones.Slot MouseSlot;
|
|
|
- public DragonBones.Slot LeftShoeSlot;
|
|
|
- public DragonBones.Slot RightShoeSlot;
|
|
|
- public DragonBones.Slot HeadWearSlot;
|
|
|
+ public Armature NeckSlot;
|
|
|
+ public Armature LeftHandSlot;
|
|
|
+ public Armature RightHandSlot;
|
|
|
+ public Armature LeftLegSlot;
|
|
|
+ public Armature RightLegSlot;
|
|
|
+ public Armature LeftLongSleeveSlot;
|
|
|
+ public Armature LeftShortSleeveSlot;
|
|
|
+ public Armature RightLongSleeveSlot;
|
|
|
+ public Armature RightShortSleeveSlot;
|
|
|
+
|
|
|
+ public Armature EyeArmature;
|
|
|
+ public Armature TopArmature;
|
|
|
+ public Armature HeadArmature;
|
|
|
+ public Armature DressArmature;
|
|
|
+ public Armature WingArmature;
|
|
|
+ public Armature MouseArmature;
|
|
|
+ public Armature LeftShoeArmature;
|
|
|
+ public Armature RightShoeArmature;
|
|
|
+ public Armature HeadWearArmature;
|
|
|
|
|
|
public UnityArmatureComponent UAC;
|
|
|
|
|
@@ -816,16 +820,16 @@ public class Player : Regist , IPointerClickHandler
|
|
|
LeftShortSleeveSlot = UAC.armature.GetSlot("上衣1袖子左");
|
|
|
RightLongSleeveSlot = UAC.armature.GetSlot("长袖右9");
|
|
|
RightShortSleeveSlot = UAC.armature.GetSlot("上衣1袖子右");
|
|
|
- //Debug.Log (LeftLongSleeveSlot);
|
|
|
- EyeSlot = UAC.armature.GetSlot("眼睛");
|
|
|
- TopSlot = UAC.armature.GetSlot("上衣");
|
|
|
- HeadSlot = UAC.armature.GetSlot("脑壳");
|
|
|
- WingSlot = UAC.armature.GetSlot("翅膀");
|
|
|
- DressSlot = UAC.armature.GetSlot("裙子");
|
|
|
- MouseSlot = UAC.armature.GetSlot("嘴巴");
|
|
|
- LeftShoeSlot = UAC.armature.GetSlot("鞋子左");
|
|
|
- RightShoeSlot = UAC.armature.GetSlot("鞋子右");
|
|
|
- HeadWearSlot = UAC.armature.GetSlot("头饰品");
|
|
|
+
|
|
|
+ EyeArmature = UAC.armature.GetSlot("眼睛");
|
|
|
+ TopArmature = UAC.armature.GetSlot("上衣");
|
|
|
+ HeadArmature = UAC.armature.GetSlot("脑壳");
|
|
|
+ WingArmature = UAC.armature.GetSlot("翅膀");
|
|
|
+ DressArmature = UAC.armature.GetSlot("裙子");
|
|
|
+ MouseArmature = UAC.armature.GetSlot("嘴巴");
|
|
|
+ LeftShoeArmature = UAC.armature.GetSlot("鞋子左");
|
|
|
+ RightShoeArmature = UAC.armature.GetSlot("鞋子右");
|
|
|
+ HeadWearArmature = UAC.armature.GetSlot("头饰品");
|
|
|
|
|
|
ChangeClose(BodyPart.LeftLongSleeve, "Empty", false);
|
|
|
ChangeClose(BodyPart.LeftShortSleeve, "Empty", false);
|
|
@@ -840,6 +844,8 @@ public class Player : Regist , IPointerClickHandler
|
|
|
ChangeClose(BodyPart.Mouse, "嘴巴1", false);
|
|
|
ChangeClose(BodyPart.Headwear, "头饰品1", false);
|
|
|
|
|
|
+ //Debug.LogError("123");
|
|
|
+
|
|
|
return UAC;
|
|
|
}
|
|
|
|
|
@@ -893,49 +899,92 @@ public class Player : Regist , IPointerClickHandler
|
|
|
|
|
|
public void ResetDepth()
|
|
|
{
|
|
|
- UAC.transform.SetLZ(2.5f);
|
|
|
-
|
|
|
- if (Wing != "Empty")
|
|
|
- {
|
|
|
- transform.FindChild("Armature/" + Wing).SetLZ(0.003f);
|
|
|
- }
|
|
|
-
|
|
|
- transform.FindChild("Armature/" + Eye).SetLZ(-0.001f);
|
|
|
- transform.FindChild("Armature/" + Top).SetLZ(-0.003f);
|
|
|
- transform.FindChild("Armature/" + Mouse).SetLZ(-0.001f);
|
|
|
- transform.FindChild("Armature/" + HeadWear).SetLZ(-0.001f);
|
|
|
-
|
|
|
- Transform tempTra = transform.FindChild("Armature/" + Head);
|
|
|
-
|
|
|
- tempTra.SetLZ(0);
|
|
|
- if (tempTra.childCount > 1)
|
|
|
- {
|
|
|
- tempTra.GetChild(0).SetLZ(0.002f);
|
|
|
- tempTra.GetChild(1).SetLZ(0f);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- tempTra = transform.FindChild("Armature/" + Dress);
|
|
|
-
|
|
|
- tempTra.SetLZ(-0.002f);
|
|
|
- if (tempTra.childCount > 1)
|
|
|
- {
|
|
|
- tempTra.GetChild(0).SetLZ(0.002f);
|
|
|
- tempTra.GetChild(1).SetLZ(0f);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- tempTra = transform.FindChild("Armature/" + Shoe);
|
|
|
- tempTra.SetLZ(-0.001f);
|
|
|
-
|
|
|
- transform.FindChild("Armature").GetChild(tempTra.GetSiblingIndex() + 1).SetLZ(-0.001f);
|
|
|
-
|
|
|
-
|
|
|
- transform.FindChild("Armature/左腿").SetLZ(0);
|
|
|
- transform.FindChild("Armature/右腿").SetLZ(0);
|
|
|
- transform.FindChild("Armature/脖子").SetLZ(0.001f);
|
|
|
- transform.FindChild("Armature/左手").SetLZ(-0.001f);
|
|
|
- transform.FindChild("Armature/右手").SetLZ(-0.001f);
|
|
|
+ UAC.transform.SetLZ(2.5f);
|
|
|
+
|
|
|
+// WingSlot.UnityTransform.SetLZ(0.003f);
|
|
|
+//
|
|
|
+// EyeSlot.UnityTransform.SetLZ(-0.001f);
|
|
|
+// TopSlot.UnityTransform.SetLZ(-0.003f);
|
|
|
+// MouseSlot.UnityTransform.SetLZ(-0.001f);
|
|
|
+// HeadWearSlot.UnityTransform.SetLZ(-0.001f);
|
|
|
+//
|
|
|
+// HeadSlot.UnityTransform.SetLZ(0);
|
|
|
+// if (HeadSlot.UnityTransform.childCount > 1)
|
|
|
+// {
|
|
|
+// HeadSlot.UnityTransform.GetChild(0).SetLZ(0.002f);
|
|
|
+// HeadSlot.UnityTransform.GetChild(1).SetLZ(0f);
|
|
|
+// }
|
|
|
+//
|
|
|
+// DressSlot.UnityTransform.SetLZ(-0.002f);
|
|
|
+// if (DressSlot.UnityTransform.childCount > 1)
|
|
|
+// {
|
|
|
+// DressSlot.UnityTransform.GetChild(0).SetLZ(0.002f);
|
|
|
+// DressSlot.UnityTransform.GetChild(1).SetLZ(0f);
|
|
|
+// }
|
|
|
+//
|
|
|
+// LeftShoeSlot.UnityTransform.SetLZ(-0.001f);
|
|
|
+// RightShoeSlot.UnityTransform.SetLZ(-0.001f);
|
|
|
+//
|
|
|
+// LeftLegSlot.UnityTransform.SetLZ(0);
|
|
|
+// RightLegSlot.UnityTransform.SetLZ(0);
|
|
|
+// NeckSlot.UnityTransform.SetLZ(0.001f);
|
|
|
+// LeftHandSlot.UnityTransform.SetLZ(-0.001f);
|
|
|
+// RightHandSlot.UnityTransform.SetLZ(-0.001f);
|
|
|
+//
|
|
|
+// LeftLongSleeveSlot.UnityTransform.SetLZ(-0.0015f);
|
|
|
+// LeftShortSleeveSlot.UnityTransform.SetLZ(-0.0015f);
|
|
|
+// RightLongSleeveSlot.UnityTransform.SetLZ(-0.0015f);
|
|
|
+// RightShortSleeveSlot.UnityTransform.SetLZ(-0.0015f);
|
|
|
+
|
|
|
+// Debug.Log (LeftLongSleeveSlot.armature.UnityTransform.name);
|
|
|
+// Debug.Log (LeftShortSleeveSlot.armature.UnityTransform.name);
|
|
|
+// Debug.Log (RightLongSleeveSlot.armature.UnityTransform.name);
|
|
|
+// Debug.Log (RightShortSleeveSlot.armature.UnityTransform.name);
|
|
|
+
|
|
|
+ //
|
|
|
+// UAC.transform.SetLZ(2.5f);
|
|
|
+//
|
|
|
+// if (Wing != "Empty")
|
|
|
+// {
|
|
|
+// transform.FindChild("Armature/" + Wing).SetLZ(0.003f);
|
|
|
+// }
|
|
|
+//
|
|
|
+// transform.FindChild("Armature/" + Eye).SetLZ(-0.001f);
|
|
|
+// transform.FindChild("Armature/" + Top).SetLZ(-0.003f);
|
|
|
+// transform.FindChild("Armature/" + Mouse).SetLZ(-0.001f);
|
|
|
+// transform.FindChild("Armature/" + HeadWear).SetLZ(-0.001f);
|
|
|
+//
|
|
|
+// Transform tempTra = transform.FindChild("Armature/" + Head);
|
|
|
+//
|
|
|
+// tempTra.SetLZ(0);
|
|
|
+// if (tempTra.childCount > 1)
|
|
|
+// {
|
|
|
+// tempTra.GetChild(0).SetLZ(0.002f);
|
|
|
+// tempTra.GetChild(1).SetLZ(0f);
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// tempTra = transform.FindChild("Armature/" + Dress);
|
|
|
+//
|
|
|
+// tempTra.SetLZ(-0.002f);
|
|
|
+// if (tempTra.childCount > 1)
|
|
|
+// {
|
|
|
+// tempTra.GetChild(0).SetLZ(0.002f);
|
|
|
+// tempTra.GetChild(1).SetLZ(0f);
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// tempTra = transform.FindChild("Armature/" + Shoe);
|
|
|
+// tempTra.SetLZ(-0.001f);
|
|
|
+//
|
|
|
+// transform.FindChild("Armature").GetChild(tempTra.GetSiblingIndex() + 1).SetLZ(-0.001f);
|
|
|
+//
|
|
|
+//
|
|
|
+// transform.FindChild("Armature/左腿").SetLZ(0);
|
|
|
+// transform.FindChild("Armature/右腿").SetLZ(0);
|
|
|
+// transform.FindChild("Armature/脖子").SetLZ(0.001f);
|
|
|
+// transform.FindChild("Armature/左手").SetLZ(-0.001f);
|
|
|
+// transform.FindChild("Armature/右手").SetLZ(-0.001f);
|
|
|
}
|
|
|
|
|
|
public void ChangeClose(BodyPart bodyPart, string armatureName, bool setDepth = true)
|
|
@@ -947,26 +996,26 @@ public class Player : Regist , IPointerClickHandler
|
|
|
{
|
|
|
Eye = armatureName;
|
|
|
|
|
|
- slotList.Add(EyeSlot);
|
|
|
+ slotList.Add(EyeArmature);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Top)
|
|
|
{
|
|
|
Top = armatureName;
|
|
|
|
|
|
- slotList.Add(TopSlot);
|
|
|
+ slotList.Add(TopArmature);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Shoe)
|
|
|
{
|
|
|
Shoe = armatureName;
|
|
|
|
|
|
- slotList.Add(LeftShoeSlot);
|
|
|
- slotList.Add(RightShoeSlot);
|
|
|
+ slotList.Add(LeftShoeArmature);
|
|
|
+ slotList.Add(RightShoeArmature);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Head)
|
|
|
{
|
|
|
Head = armatureName;
|
|
|
|
|
|
- slotList.Add(HeadSlot);
|
|
|
+ slotList.Add(HeadArmature);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Wing)
|
|
|
{
|
|
@@ -978,26 +1027,26 @@ public class Player : Regist , IPointerClickHandler
|
|
|
{
|
|
|
Wing = armatureName;
|
|
|
|
|
|
- slotList.Add(WingSlot);
|
|
|
+ slotList.Add(WingArmature);
|
|
|
}
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Dress)
|
|
|
{
|
|
|
Dress = armatureName;
|
|
|
|
|
|
- slotList.Add(DressSlot);
|
|
|
+ slotList.Add(DressArmature);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Mouse)
|
|
|
{
|
|
|
Mouse = armatureName;
|
|
|
|
|
|
- slotList.Add(MouseSlot);
|
|
|
+ slotList.Add(MouseArmature);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Headwear)
|
|
|
{
|
|
|
HeadWear = armatureName;
|
|
|
|
|
|
- slotList.Add(HeadWearSlot);
|
|
|
+ slotList.Add(HeadWearArmature);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.Leg)
|
|
|
{
|
|
@@ -1018,18 +1067,26 @@ public class Player : Regist , IPointerClickHandler
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.LeftLongSleeve)
|
|
|
{
|
|
|
+// LeftLongSleeve = armatureName;
|
|
|
+
|
|
|
slotList.Add(LeftLongSleeveSlot);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.LeftShortSleeve)
|
|
|
{
|
|
|
+// LeftShortSleeve = armatureName;
|
|
|
+
|
|
|
slotList.Add(LeftShortSleeveSlot);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.RightLongSleeve)
|
|
|
{
|
|
|
+// RightLongSleeve = armatureName;
|
|
|
+
|
|
|
slotList.Add(RightLongSleeveSlot);
|
|
|
}
|
|
|
else if (bodyPart == BodyPart.RightShortSleeve)
|
|
|
{
|
|
|
+// RightShortSleeve = armatureName;
|
|
|
+
|
|
|
slotList.Add(RightShortSleeveSlot);
|
|
|
}
|
|
|
else
|
|
@@ -1054,7 +1111,7 @@ public class Player : Regist , IPointerClickHandler
|
|
|
{
|
|
|
for (int i = 0; i < slotList.Count; i++)
|
|
|
{
|
|
|
- slotList[i].childArmature = UnityFactory.factory.BuildArmature(armatureName);
|
|
|
+ slotList[i].childArmature = UnityFactory.factory.BuildArmature(armatureName, null, null, null, true);
|
|
|
}
|
|
|
|
|
|
if (setDepth)
|