|
@@ -40,7 +40,7 @@ public class CloseUnit
|
|
|
|
|
|
public string Description
|
|
|
{
|
|
|
- get { return Language.GetStr("DressRoom", CloseName); }
|
|
|
+ get { return Language.GetStr("DressRoom", ArmatureName); }
|
|
|
}
|
|
|
|
|
|
public int ID;
|
|
@@ -48,10 +48,10 @@ public class CloseUnit
|
|
|
public int BuyLevel;
|
|
|
public int PixelSize;
|
|
|
public bool Bought;
|
|
|
- public string CloseName;
|
|
|
+ public string ArmatureName;
|
|
|
|
|
|
public Text BuyBtnLab;
|
|
|
- public Sprite Sprite;
|
|
|
+ public Sprite[] Sprites;
|
|
|
public Image Icon;
|
|
|
public Button BuyBtn;
|
|
|
public Button DressBtn;
|
|
@@ -71,19 +71,19 @@ public class CloseUnit
|
|
|
public CloseUnit(XmlAttributeCollection attribute)
|
|
|
{
|
|
|
ID = Auxiliary.IntParse(attribute[0].Value, -1);
|
|
|
- CloseName = attribute[2].Value;
|
|
|
- Sprite = SpriteParse(attribute[2].Value);
|
|
|
- Type = TypeParse(attribute[3].Value);
|
|
|
- Index = Auxiliary.IntParse(attribute[4].Value, -1);
|
|
|
- BodyPart = BodyPartParse(attribute[5].Value);
|
|
|
- BuyLevel = Auxiliary.IntParse(attribute[6].Value, 0);
|
|
|
- BuyCurrent = Auxiliary.CurrentParse(attribute[7].Value);
|
|
|
- BuyAmt = Auxiliary.DoubleParse(attribute[8].Value, 0);
|
|
|
- BuyAdvanceCurrent = Auxiliary.CurrentParse(attribute[9].Value);
|
|
|
- BuyAdvanceAmt = Auxiliary.DoubleParse(attribute[10].Value, 0);
|
|
|
- PixelSize = Auxiliary.IntParse(attribute[11].Value, 100);
|
|
|
-
|
|
|
- ManaPlayer.CloseIDDic.Add(CloseName, ID);
|
|
|
+ Type = TypeParse(attribute[2].Value);
|
|
|
+ Index = Auxiliary.IntParse(attribute[3].Value, -1);
|
|
|
+ BodyPart = BodyPartParse(attribute[4].Value);
|
|
|
+ BuyLevel = Auxiliary.IntParse(attribute[5].Value, 0);
|
|
|
+ BuyCurrent = Auxiliary.CurrentParse(attribute[6].Value);
|
|
|
+ BuyAmt = Auxiliary.DoubleParse(attribute[7].Value, 0);
|
|
|
+ BuyAdvanceCurrent = Auxiliary.CurrentParse(attribute[8].Value);
|
|
|
+ BuyAdvanceAmt = Auxiliary.DoubleParse(attribute[9].Value, 0);
|
|
|
+ PixelSize = Auxiliary.IntParse(attribute[10].Value, 100);
|
|
|
+ Sprites = SpriteParse(attribute[11].Value);
|
|
|
+ ArmatureName = attribute[12].Value;
|
|
|
+
|
|
|
+ ManaPlayer.CloseIDDic.Add(ArmatureName, ID);
|
|
|
ManaPlayer.CloseUnitDic.Add(ID, this);
|
|
|
|
|
|
CreateItem();
|
|
@@ -129,7 +129,7 @@ public class CloseUnit
|
|
|
BuyBtnLab = ChildDic["BuyBtnLab"].GetComponent<Text>();
|
|
|
|
|
|
|
|
|
- Icon.sprite = Sprite;
|
|
|
+ Icon.sprite = Sprites[0];
|
|
|
|
|
|
Icon.SetNativeSize();
|
|
|
|
|
@@ -148,7 +148,7 @@ public class CloseUnit
|
|
|
ManaReso.Get("Pa_Info").TweenForCG();
|
|
|
|
|
|
Image image = ManaReso.Get<Image>("Pa_Icon");
|
|
|
- image.sprite = Sprite;
|
|
|
+ image.sprite = Sprites[0];
|
|
|
image.Resize(true, new Vector2(newSize, newSize));
|
|
|
|
|
|
ManaReso.SetText("Pa_Lab", Description);
|
|
@@ -168,14 +168,23 @@ public class CloseUnit
|
|
|
{
|
|
|
ManaAudio.PlayClip(Clip.BtnClip);
|
|
|
|
|
|
- ManaPlayer.Player.ChangeClose(BodyPart, CloseName);
|
|
|
+ ManaPlayer.Player.ChangeClose(BodyPart, ArmatureName);
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- protected Sprite SpriteParse(string str)
|
|
|
+ protected Sprite[] SpriteParse(string str)
|
|
|
{
|
|
|
- return ManaPlayer.CloseSpriteDic[str];
|
|
|
+ string[] spriteNames = str.Split(',');
|
|
|
+
|
|
|
+ Sprite[] sprites = new Sprite[spriteNames.Length];
|
|
|
+
|
|
|
+ for (int i = 0; i < spriteNames.Length; i++)
|
|
|
+ {
|
|
|
+ sprites[i] = ManaPlayer.CloseSpriteDic[spriteNames[i]];
|
|
|
+ }
|
|
|
+
|
|
|
+ return sprites;
|
|
|
}
|
|
|
|
|
|
protected BodyPart BodyPartParse(string str)
|
|
@@ -345,6 +354,11 @@ public class Player : Regist , IPointerClickHandler
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public void Update()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public void FixedUpdate()
|
|
|
{
|
|
|
if (InDressRoom)
|
|
@@ -601,6 +615,8 @@ public class Player : Regist , IPointerClickHandler
|
|
|
EventType.ForwardFinish,
|
|
|
() =>
|
|
|
{
|
|
|
+ ManaPlayer.InitializeDressRoom();
|
|
|
+
|
|
|
ManaReso.Get("I_BlackMask").TweenForCG();
|
|
|
}
|
|
|
);
|