|
@@ -11,7 +11,7 @@ using System.Collections.Generic;
|
|
|
|
|
|
using Random = UnityEngine.Random;
|
|
using Random = UnityEngine.Random;
|
|
|
|
|
|
-public enum ArchiveSource
|
|
|
|
|
|
+public enum ConfigSource
|
|
{
|
|
{
|
|
Fake,
|
|
Fake,
|
|
Random,
|
|
Random,
|
|
@@ -38,99 +38,99 @@ public class VisitManager : Regist
|
|
|
|
|
|
#region 配置
|
|
#region 配置
|
|
|
|
|
|
- public static int Cost
|
|
|
|
|
|
+ public static int VisitCost
|
|
{
|
|
{
|
|
- get { return Cost_; }
|
|
|
|
|
|
+ get { return visitCost; }
|
|
set
|
|
set
|
|
{
|
|
{
|
|
- Cost_ = value;
|
|
|
|
|
|
+ visitCost = value;
|
|
|
|
|
|
- ResourceManager.Get<Text>(ObjectLabel.C_CostLab).text = TransferLabel.CoinSprite + Cost;
|
|
|
|
|
|
+ ResourceManager.Get<Text>(ObjectLabel.C_CostLab).text = TransferLabel.CoinSprite + VisitCost;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ public static int visitCost;
|
|
|
|
|
|
- public static int Cost_;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- public static int CoolTime;
|
|
|
|
- public static float FancyRate;
|
|
|
|
- public static float AwardRate;
|
|
|
|
- public static float CreateRate;
|
|
|
|
- public static string CostFml;
|
|
|
|
|
|
+ public static int VisitCDTime;
|
|
|
|
+ public static float FancyGardenRate;
|
|
|
|
+ public static float CreateAwardRate;
|
|
|
|
+ public static float FakeGardenRate;
|
|
|
|
+ public static string VisitCostFml;
|
|
public static string AwardMinFml;
|
|
public static string AwardMinFml;
|
|
public static string AwardMaxFml;
|
|
public static string AwardMaxFml;
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
- public static float PullTimer;
|
|
|
|
|
|
+ public static int MaxTipAmt = 10;
|
|
|
|
+
|
|
|
|
+ public static int MaxStachConfigAmt = 8;
|
|
|
|
+ public static float PullArchiveTime = 0.5f;
|
|
|
|
+ public static float PullConfigTimer;
|
|
public static List<VisitData> UsedDataList = new List<VisitData>();
|
|
public static List<VisitData> UsedDataList = new List<VisitData>();
|
|
public static List<VisitData> UnusedDataList = new List<VisitData>();
|
|
public static List<VisitData> UnusedDataList = new List<VisitData>();
|
|
|
|
|
|
|
|
+ public static bool Inited;
|
|
public static bool InVisit;
|
|
public static bool InVisit;
|
|
- public static bool Complete;
|
|
|
|
- public static bool LoadComplete;
|
|
|
|
- public static bool TweenComplete;
|
|
|
|
|
|
+ public static bool IsPullConfigComplete;
|
|
|
|
+ public static bool IsBlackMaskTweenComplete;
|
|
|
|
|
|
- public static int Slot;
|
|
|
|
- public static int Level;
|
|
|
|
- public static XmlNode Node;
|
|
|
|
- public static XmlDocument Document;
|
|
|
|
-
|
|
|
|
- public static int VisiteePraise;
|
|
|
|
|
|
+ public static int VisiteeLevel;
|
|
|
|
+ public static int VisiteeTotalSlot;
|
|
|
|
+ public static int VisiteePraiseAmt;
|
|
public static string VisiteeSerialNumber;
|
|
public static string VisiteeSerialNumber;
|
|
|
|
+ public static XmlNode VisiteeRootNode;
|
|
|
|
+ public static XmlDocument VisiteeDocument;
|
|
|
|
+ public static List<Slot> VisiteePlantList;
|
|
|
|
|
|
- public static bool OriginBird;
|
|
|
|
- public static bool OriginTree;
|
|
|
|
- public static bool OriginRainbow;
|
|
|
|
- public static List<Slot> VisitPlantList;
|
|
|
|
- public static List<Slot> OriginPlantList;
|
|
|
|
- public static List<ElfType> OriginElfList;
|
|
|
|
|
|
+ public static bool PlayerBirdFlag;
|
|
|
|
+ public static bool PlayerTreeFlag;
|
|
|
|
+ public static bool PlayerRainbowFlag;
|
|
|
|
+ public static List<Slot> PlayerPlantList;
|
|
|
|
+ public static List<ElfType> PlayerElfList;
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
- private int MaxStachAmt = 8;
|
|
|
|
- private float PullArchiveTime = 0.5f;
|
|
|
|
public void Update()
|
|
public void Update()
|
|
{
|
|
{
|
|
- if (UnusedDataList.Count > MaxStachAmt)
|
|
|
|
|
|
+ if (UnusedDataList.Count > MaxStachConfigAmt)
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- PullTimer += Time.deltaTime;
|
|
|
|
|
|
+ PullConfigTimer += Time.deltaTime;
|
|
|
|
|
|
- if (PullTimer >= PullArchiveTime)
|
|
|
|
|
|
+ if (PullConfigTimer >= PullArchiveTime)
|
|
{
|
|
{
|
|
- PullTimer = 0;
|
|
|
|
|
|
+ PullConfigTimer = 0;
|
|
|
|
|
|
- HttpManager.RandomLoad
|
|
|
|
|
|
+ HttpManager.GetRandomConfig
|
|
(
|
|
(
|
|
data =>
|
|
data =>
|
|
{
|
|
{
|
|
- PullArchiveCallback(data, null, SavePulledArchive);
|
|
|
|
|
|
+ PullConfigCallback(data, null, SavePulledConfig);
|
|
}
|
|
}
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public static void Initialize()
|
|
|
|
|
|
+
|
|
|
|
+ public static void Init()
|
|
{
|
|
{
|
|
XmlAttributeCollection attribute = ConfigManager.GetVisitConfig();
|
|
XmlAttributeCollection attribute = ConfigManager.GetVisitConfig();
|
|
|
|
|
|
- CostFml = attribute[5].Value;
|
|
|
|
|
|
+ VisitCostFml = attribute[5].Value;
|
|
|
|
|
|
- Cost = Mathf.FloorToInt((float)Auxiliary.FmlParse(CostFml, "l", Manager.Level.ToString()));
|
|
|
|
|
|
+ VisitCost = Mathf.FloorToInt((float)Auxiliary.FmlParse(VisitCostFml, "l", Manager.GardenLevel.ToString()));
|
|
AwardMinFml = attribute[2].Value;
|
|
AwardMinFml = attribute[2].Value;
|
|
AwardMaxFml = attribute[3].Value;
|
|
AwardMaxFml = attribute[3].Value;
|
|
|
|
|
|
- CoolTime = int.Parse(attribute[4].Value);
|
|
|
|
- FancyRate = float.Parse(attribute[7].Value);
|
|
|
|
- AwardRate = float.Parse(attribute[1].Value);
|
|
|
|
- CreateRate = float.Parse(attribute[6].Value);
|
|
|
|
|
|
+ VisitCDTime = int.Parse(attribute[4].Value);
|
|
|
|
+ FancyGardenRate = float.Parse(attribute[7].Value);
|
|
|
|
+ CreateAwardRate = float.Parse(attribute[1].Value);
|
|
|
|
+ FakeGardenRate = float.Parse(attribute[6].Value);
|
|
|
|
|
|
#region 倒计时
|
|
#region 倒计时
|
|
|
|
|
|
- if (CoolTime != 0)
|
|
|
|
|
|
+ if (VisitCDTime != 0)
|
|
{
|
|
{
|
|
Text text = ResourceManager.Get<Text>(ObjectLabel.C_VisitLab);
|
|
Text text = ResourceManager.Get<Text>(ObjectLabel.C_VisitLab);
|
|
|
|
|
|
@@ -143,7 +143,7 @@ public class VisitManager : Regist
|
|
Vector3 v2 = new Vector3(0.4f, 0.4f, 0.4f);
|
|
Vector3 v2 = new Vector3(0.4f, 0.4f, 0.4f);
|
|
Vector3 v3 = new Vector3(0, 0, 0);
|
|
Vector3 v3 = new Vector3(0, 0, 0);
|
|
|
|
|
|
- for (int i = 0; i < CoolTime - 1; i++)
|
|
|
|
|
|
+ for (int i = 0; i < VisitCDTime - 1; i++)
|
|
{
|
|
{
|
|
delayList.Add(0.5f);
|
|
delayList.Add(0.5f);
|
|
delayList.Add(0);
|
|
delayList.Add(0);
|
|
@@ -151,7 +151,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
delayList.Add(0.5f);
|
|
delayList.Add(0.5f);
|
|
|
|
|
|
- for (int i = 0; i < CoolTime; i++)
|
|
|
|
|
|
+ for (int i = 0; i < VisitCDTime; i++)
|
|
{
|
|
{
|
|
durationList.Add(0.25f);
|
|
durationList.Add(0.25f);
|
|
durationList.Add(0.25f);
|
|
durationList.Add(0.25f);
|
|
@@ -164,7 +164,7 @@ public class VisitManager : Regist
|
|
(
|
|
(
|
|
() =>
|
|
() =>
|
|
{
|
|
{
|
|
- text.text = (CoolTime - tempInt).ToString();
|
|
|
|
|
|
+ text.text = (VisitCDTime - tempInt).ToString();
|
|
AudioManager.PlayClip(AudioLabel.ClickButton);
|
|
AudioManager.PlayClip(AudioLabel.ClickButton);
|
|
}
|
|
}
|
|
);
|
|
);
|
|
@@ -192,10 +192,26 @@ public class VisitManager : Regist
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
- Complete = true;
|
|
|
|
|
|
+ Inited = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ public static void EnterVisiteeGarden(VisitData visitData)
|
|
|
|
+ {
|
|
|
|
+ IsPullConfigComplete = true;
|
|
|
|
+ VisiteePraiseAmt = int.Parse(visitData.JsonData["p"].ToString());
|
|
|
|
+ if (visitData.JsonData.Inst_Object.ContainsKey("i"))
|
|
|
|
+ {
|
|
|
|
+ VisiteeSerialNumber = visitData.JsonData["i"].ToString();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ VisiteeDocument = visitData.Document;
|
|
|
|
+
|
|
|
|
+ SetVisiteeCommentPanel();
|
|
|
|
+
|
|
|
|
+ EnterVisiteeGarden();
|
|
|
|
+ }
|
|
|
|
+
|
|
public static void ExitVisiteeGarden()
|
|
public static void ExitVisiteeGarden()
|
|
{
|
|
{
|
|
ResourceManager.Get(ObjectLabel.I_BlackMask).TweenForCG();
|
|
ResourceManager.Get(ObjectLabel.I_BlackMask).TweenForCG();
|
|
@@ -212,31 +228,31 @@ public class VisitManager : Regist
|
|
ResourceManager.SetActive(ObjectLabel.C_Return, false);
|
|
ResourceManager.SetActive(ObjectLabel.C_Return, false);
|
|
ResourceManager.SetActive(ObjectLabel.C_Garden, false);
|
|
ResourceManager.SetActive(ObjectLabel.C_Garden, false);
|
|
|
|
|
|
- GardenManager.MiniLock = true;
|
|
|
|
|
|
+ GardenManager.InMinigameFlag = true;
|
|
|
|
|
|
#region Garden
|
|
#region Garden
|
|
|
|
|
|
- GardenManager.RetriveFlowerAll();
|
|
|
|
|
|
+ GardenManager.RetriveAllFlower();
|
|
|
|
|
|
- for (int i = 0; i < GardenManager.PageList.Count; i++)
|
|
|
|
|
|
+ for (int i = 0; i < GardenManager.SlotPageList.Count; i++)
|
|
{
|
|
{
|
|
- ResourceManager.Save(GardenManager.PageList[i]);
|
|
|
|
|
|
+ ResourceManager.Save(GardenManager.SlotPageList[i]);
|
|
}
|
|
}
|
|
|
|
|
|
- GardenManager.PageList = new List<Transform>();
|
|
|
|
|
|
+ GardenManager.SlotPageList = new List<Transform>();
|
|
|
|
|
|
GardenManager.SlotList = new List<Slot>();
|
|
GardenManager.SlotList = new List<Slot>();
|
|
- GardenManager.PageList = new List<Transform>();
|
|
|
|
|
|
+ GardenManager.SlotPageList = new List<Transform>();
|
|
|
|
|
|
|
|
|
|
Garden.ResetPage();
|
|
Garden.ResetPage();
|
|
Garden.PagePos = new List<Vector3>();
|
|
Garden.PagePos = new List<Vector3>();
|
|
|
|
|
|
- int pageAmt = GardenManager.DefaultPage;
|
|
|
|
|
|
+ int pageAmt = GardenManager.DefaultSlotPage;
|
|
|
|
|
|
- if (GardenManager.Slot >= GardenManager.CriticalSlotAmt)
|
|
|
|
|
|
+ if (GardenManager.TotalSlot >= GardenManager.CriticalSlotIndex)
|
|
{
|
|
{
|
|
- pageAmt = (GardenManager.Slot - GardenManager.CriticalSlotAmt) / GardenManager.TotalSlotAmtInOnePage + 3;
|
|
|
|
|
|
+ pageAmt = (GardenManager.TotalSlot - GardenManager.CriticalSlotIndex) / GardenManager.TotalSlotInOnePage + 3;
|
|
}
|
|
}
|
|
|
|
|
|
for (int i = 0; i < pageAmt; i++)
|
|
for (int i = 0; i < pageAmt; i++)
|
|
@@ -246,7 +262,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
for (int i = 0; i < GardenManager.SlotList.Count; i++)
|
|
for (int i = 0; i < GardenManager.SlotList.Count; i++)
|
|
{
|
|
{
|
|
- if (i < GardenManager.Slot)
|
|
|
|
|
|
+ if (i < GardenManager.TotalSlot)
|
|
{
|
|
{
|
|
GardenManager.SlotList[i].Lock = true;
|
|
GardenManager.SlotList[i].Lock = true;
|
|
GardenManager.SlotList[i].Available = true;
|
|
GardenManager.SlotList[i].Available = true;
|
|
@@ -270,7 +286,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
#region Bird Tree Rainbow
|
|
#region Bird Tree Rainbow
|
|
|
|
|
|
- if (OriginBird)
|
|
|
|
|
|
+ if (PlayerBirdFlag)
|
|
{
|
|
{
|
|
ResourceManager.Get(GardenLabel.BirdPivot).GetTweenSr().InDestination = true;
|
|
ResourceManager.Get(GardenLabel.BirdPivot).GetTweenSr().InDestination = true;
|
|
}
|
|
}
|
|
@@ -279,7 +295,7 @@ public class VisitManager : Regist
|
|
ResourceManager.Get(GardenLabel.BirdPivot).GetTweenSr().InOrigin = true;
|
|
ResourceManager.Get(GardenLabel.BirdPivot).GetTweenSr().InOrigin = true;
|
|
}
|
|
}
|
|
|
|
|
|
- if (OriginTree)
|
|
|
|
|
|
+ if (PlayerTreeFlag)
|
|
{
|
|
{
|
|
ResourceManager.Get(GardenLabel.GardenLeftTree).GetTweenSr().InDestination = true;
|
|
ResourceManager.Get(GardenLabel.GardenLeftTree).GetTweenSr().InDestination = true;
|
|
ResourceManager.Get(GardenLabel.GardenRightTree).GetTweenSr().InDestination = true;
|
|
ResourceManager.Get(GardenLabel.GardenRightTree).GetTweenSr().InDestination = true;
|
|
@@ -290,7 +306,7 @@ public class VisitManager : Regist
|
|
ResourceManager.Get(GardenLabel.GardenRightTree).GetTweenSr().InOrigin = true;
|
|
ResourceManager.Get(GardenLabel.GardenRightTree).GetTweenSr().InOrigin = true;
|
|
}
|
|
}
|
|
|
|
|
|
- if (OriginRainbow)
|
|
|
|
|
|
+ if (PlayerRainbowFlag)
|
|
{
|
|
{
|
|
ResourceManager.Get(GardenLabel.GardenRainbow).GetTweenSr().InDestination = true;
|
|
ResourceManager.Get(GardenLabel.GardenRainbow).GetTweenSr().InDestination = true;
|
|
}
|
|
}
|
|
@@ -305,10 +321,10 @@ public class VisitManager : Regist
|
|
|
|
|
|
ResourceManager.Save(PlayerManager.Player);
|
|
ResourceManager.Save(PlayerManager.Player);
|
|
|
|
|
|
- ResourceManager.TraDic.Remove(PlayerLabel.Player);
|
|
|
|
|
|
+ ResourceManager.TransformDictionary.Remove(PlayerLabel.Player);
|
|
|
|
|
|
PlayerManager.Instance.GetPlayer();
|
|
PlayerManager.Instance.GetPlayer();
|
|
- UIManager.SetEnterGameLabel();
|
|
|
|
|
|
+ UIManager.SetEnterMinigameGameLabel();
|
|
|
|
|
|
Garden.PlayerPos = new List<Vector3>();
|
|
Garden.PlayerPos = new List<Vector3>();
|
|
|
|
|
|
@@ -318,11 +334,11 @@ public class VisitManager : Regist
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
- GardenManager.ElfList = new List<ElfType>(OriginElfList);
|
|
|
|
|
|
+ GardenManager.ElfList = new List<ElfType>(PlayerElfList);
|
|
|
|
|
|
InVisit = false;
|
|
InVisit = false;
|
|
- LoadComplete = false;
|
|
|
|
- TweenComplete = false;
|
|
|
|
|
|
+ IsPullConfigComplete = false;
|
|
|
|
+ IsBlackMaskTweenComplete = false;
|
|
|
|
|
|
SetPlayerPraise();
|
|
SetPlayerPraise();
|
|
SetPlayerCommentPanel();
|
|
SetPlayerCommentPanel();
|
|
@@ -332,18 +348,18 @@ public class VisitManager : Regist
|
|
|
|
|
|
public static void EnterVisiteeGarden()
|
|
public static void EnterVisiteeGarden()
|
|
{
|
|
{
|
|
- if (!LoadComplete || !TweenComplete)
|
|
|
|
|
|
+ if (!IsPullConfigComplete || !IsBlackMaskTweenComplete)
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
ResourceManager.Get(ObjectLabel.I_BlackMask).TweenForCG();
|
|
ResourceManager.Get(ObjectLabel.I_BlackMask).TweenForCG();
|
|
//Debug.Log(Document.OuterXml);
|
|
//Debug.Log(Document.OuterXml);
|
|
- SetVisiteePraise(Document);
|
|
|
|
|
|
+ SetVisiteePraise(VisiteeDocument);
|
|
|
|
|
|
ShowTip ();
|
|
ShowTip ();
|
|
|
|
|
|
- Node = Document.SelectSingleNode(PlayerConfigLabel.RootNode);
|
|
|
|
|
|
+ VisiteeRootNode = VisiteeDocument.SelectSingleNode(PlayerConfigLabel.RootNode);
|
|
|
|
|
|
ResourceManager.SetActive(ObjectLabel.C_Coin, false);
|
|
ResourceManager.SetActive(ObjectLabel.C_Coin, false);
|
|
ResourceManager.SetActive(ObjectLabel.C_Group1, false);
|
|
ResourceManager.SetActive(ObjectLabel.C_Group1, false);
|
|
@@ -365,7 +381,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
ResourceManager.SetActive(ObjectLabel.C_Return, true);
|
|
ResourceManager.SetActive(ObjectLabel.C_Return, true);
|
|
|
|
|
|
- GardenManager.MiniLock = false;
|
|
|
|
|
|
+ GardenManager.InMinigameFlag = false;
|
|
|
|
|
|
#region Bird Tree Rainbow
|
|
#region Bird Tree Rainbow
|
|
|
|
|
|
@@ -373,17 +389,17 @@ public class VisitManager : Regist
|
|
{
|
|
{
|
|
if (ResourceManager.Get(GardenLabel.BirdPivot).gameObject.activeSelf)
|
|
if (ResourceManager.Get(GardenLabel.BirdPivot).gameObject.activeSelf)
|
|
{
|
|
{
|
|
- OriginBird = true;
|
|
|
|
|
|
+ PlayerBirdFlag = true;
|
|
}
|
|
}
|
|
|
|
|
|
if (ResourceManager.Get(GardenLabel.GardenLeftTree).gameObject.activeSelf)
|
|
if (ResourceManager.Get(GardenLabel.GardenLeftTree).gameObject.activeSelf)
|
|
{
|
|
{
|
|
- OriginTree = true;
|
|
|
|
|
|
+ PlayerTreeFlag = true;
|
|
}
|
|
}
|
|
|
|
|
|
if (ResourceManager.Get(GardenLabel.GardenRainbow).gameObject.activeSelf)
|
|
if (ResourceManager.Get(GardenLabel.GardenRainbow).gameObject.activeSelf)
|
|
{
|
|
{
|
|
- OriginRainbow = true;
|
|
|
|
|
|
+ PlayerRainbowFlag = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -396,17 +412,17 @@ public class VisitManager : Regist
|
|
|
|
|
|
#region Ability
|
|
#region Ability
|
|
|
|
|
|
- Slot = GardenManager.DefaultSlot;
|
|
|
|
- Slot += ConfigManager.GetIntFormConfig(PlayerConfigLabel.ExtraSlot);
|
|
|
|
|
|
+ VisiteeTotalSlot = GardenManager.DefaultUnlockSlot;
|
|
|
|
+ VisiteeTotalSlot += ConfigManager.GetIntFormConfig(PlayerConfigLabel.ExtraSlot);
|
|
|
|
|
|
if (!InVisit)
|
|
if (!InVisit)
|
|
{
|
|
{
|
|
- OriginElfList = new List<ElfType>(GardenManager.ElfList);
|
|
|
|
|
|
+ PlayerElfList = new List<ElfType>(GardenManager.ElfList);
|
|
}
|
|
}
|
|
|
|
|
|
GardenManager.ElfList = new List<ElfType>();
|
|
GardenManager.ElfList = new List<ElfType>();
|
|
|
|
|
|
- List<XmlAttributeCollection> attributeList = ConfigManager.GetSkillList(Node);
|
|
|
|
|
|
+ List<XmlAttributeCollection> attributeList = ConfigManager.GetSkillList(VisiteeRootNode);
|
|
|
|
|
|
for (int i = 0; i < attributeList.Count; i++)
|
|
for (int i = 0; i < attributeList.Count; i++)
|
|
{
|
|
{
|
|
@@ -417,9 +433,9 @@ public class VisitManager : Regist
|
|
|
|
|
|
if (attributeList[i][0].Value == "Ability1")
|
|
if (attributeList[i][0].Value == "Ability1")
|
|
{
|
|
{
|
|
- Level = int.Parse(attributeList[i][3].Value);
|
|
|
|
|
|
+ VisiteeLevel = int.Parse(attributeList[i][3].Value);
|
|
|
|
|
|
- ResourceManager.SetText(ObjectLabel.C_GardenLab, Language.GetStr(LanguageLabel.UI__C_GardenLab) + Level);
|
|
|
|
|
|
+ ResourceManager.SetText(ObjectLabel.C_GardenLab, Language.GetStr(LanguageLabel.UI__C_GardenLab) + VisiteeLevel);
|
|
|
|
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -448,115 +464,115 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability6")
|
|
else if (attributeList[i][0].Value == "Ability6")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Bee_Purple);
|
|
GardenManager.ElfList.Add(ElfType.Bee_Purple);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability7")
|
|
else if (attributeList[i][0].Value == "Ability7")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Bee_Blue);
|
|
GardenManager.ElfList.Add(ElfType.Bee_Blue);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability8")
|
|
else if (attributeList[i][0].Value == "Ability8")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Bee_Red);
|
|
GardenManager.ElfList.Add(ElfType.Bee_Red);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability9")
|
|
else if (attributeList[i][0].Value == "Ability9")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Bee_White);
|
|
GardenManager.ElfList.Add(ElfType.Bee_White);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability10")
|
|
else if (attributeList[i][0].Value == "Ability10")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Yellow);
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Yellow);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability11")
|
|
else if (attributeList[i][0].Value == "Ability11")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Purple);
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Purple);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability12")
|
|
else if (attributeList[i][0].Value == "Ability12")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Blue);
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Blue);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability13")
|
|
else if (attributeList[i][0].Value == "Ability13")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Red);
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_Red);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability14")
|
|
else if (attributeList[i][0].Value == "Ability14")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_White);
|
|
GardenManager.ElfList.Add(ElfType.Butterfly_White);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability15")
|
|
else if (attributeList[i][0].Value == "Ability15")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Yellow);
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Yellow);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability16")
|
|
else if (attributeList[i][0].Value == "Ability16")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Purple);
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Purple);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability17")
|
|
else if (attributeList[i][0].Value == "Ability17")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Blue);
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Blue);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability18")
|
|
else if (attributeList[i][0].Value == "Ability18")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Red);
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_Red);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability19")
|
|
else if (attributeList[i][0].Value == "Ability19")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_White);
|
|
GardenManager.ElfList.Add(ElfType.Dragonfly_White);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability20")
|
|
else if (attributeList[i][0].Value == "Ability20")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Yellow);
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Yellow);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability21")
|
|
else if (attributeList[i][0].Value == "Ability21")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Purple);
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Purple);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability22")
|
|
else if (attributeList[i][0].Value == "Ability22")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Blue);
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Blue);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability23")
|
|
else if (attributeList[i][0].Value == "Ability23")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Red);
|
|
GardenManager.ElfList.Add(ElfType.Beetle_Red);
|
|
}
|
|
}
|
|
else if (attributeList[i][0].Value == "Ability24")
|
|
else if (attributeList[i][0].Value == "Ability24")
|
|
{
|
|
{
|
|
- Slot++;
|
|
|
|
|
|
+ VisiteeTotalSlot++;
|
|
|
|
|
|
GardenManager.ElfList.Add(ElfType.Beetle_White);
|
|
GardenManager.ElfList.Add(ElfType.Beetle_White);
|
|
}
|
|
}
|
|
@@ -568,33 +584,33 @@ public class VisitManager : Regist
|
|
|
|
|
|
if (!InVisit)
|
|
if (!InVisit)
|
|
{
|
|
{
|
|
- OriginPlantList = new List<Slot>(GardenManager.PlantList);
|
|
|
|
|
|
+ PlayerPlantList = new List<Slot>(GardenManager.PlantSlotList);
|
|
|
|
|
|
ConfigManager.SaveDress();
|
|
ConfigManager.SaveDress();
|
|
ConfigManager.SavePlantList();
|
|
ConfigManager.SavePlantList();
|
|
}
|
|
}
|
|
|
|
|
|
- GardenManager.RetriveFlowerAll();
|
|
|
|
|
|
+ GardenManager.RetriveAllFlower();
|
|
|
|
|
|
- for (int i = 0; i < GardenManager.PageList.Count; i++)
|
|
|
|
|
|
+ for (int i = 0; i < GardenManager.SlotPageList.Count; i++)
|
|
{
|
|
{
|
|
- ResourceManager.Save(GardenManager.PageList[i]);
|
|
|
|
|
|
+ ResourceManager.Save(GardenManager.SlotPageList[i]);
|
|
}
|
|
}
|
|
|
|
|
|
- GardenManager.PageList = new List<Transform>();
|
|
|
|
|
|
+ GardenManager.SlotPageList = new List<Transform>();
|
|
|
|
|
|
GardenManager.SlotList = new List<Slot>();
|
|
GardenManager.SlotList = new List<Slot>();
|
|
- GardenManager.PageList = new List<Transform>();
|
|
|
|
|
|
+ GardenManager.SlotPageList = new List<Transform>();
|
|
|
|
|
|
|
|
|
|
Garden.ResetPage();
|
|
Garden.ResetPage();
|
|
Garden.PagePos = new List<Vector3>();
|
|
Garden.PagePos = new List<Vector3>();
|
|
|
|
|
|
- int pageAmt = GardenManager.DefaultPage;
|
|
|
|
|
|
+ int pageAmt = GardenManager.DefaultSlotPage;
|
|
|
|
|
|
- if (Slot >= GardenManager.CriticalSlotAmt)
|
|
|
|
|
|
+ if (VisiteeTotalSlot >= GardenManager.CriticalSlotIndex)
|
|
{
|
|
{
|
|
- pageAmt = (Slot - GardenManager.CriticalSlotAmt) / GardenManager.TotalSlotAmtInOnePage + 3;
|
|
|
|
|
|
+ pageAmt = (VisiteeTotalSlot - GardenManager.CriticalSlotIndex) / GardenManager.TotalSlotInOnePage + 3;
|
|
}
|
|
}
|
|
|
|
|
|
for (int i = 0; i < pageAmt; i++)
|
|
for (int i = 0; i < pageAmt; i++)
|
|
@@ -604,7 +620,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
for (int i = 0; i < GardenManager.SlotList.Count; i++)
|
|
for (int i = 0; i < GardenManager.SlotList.Count; i++)
|
|
{
|
|
{
|
|
- if (i < Slot)
|
|
|
|
|
|
+ if (i < VisiteeTotalSlot)
|
|
{
|
|
{
|
|
GardenManager.SlotList[i].Lock = true;
|
|
GardenManager.SlotList[i].Lock = true;
|
|
GardenManager.SlotList[i].Available = true;
|
|
GardenManager.SlotList[i].Available = true;
|
|
@@ -616,7 +632,7 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- List<KV<int, int>> plantList = ConfigManager.GetPlantList(Node);
|
|
|
|
|
|
+ List<KV<int, int>> plantList = ConfigManager.GetPlantList(VisiteeRootNode);
|
|
|
|
|
|
for (int i = 0; i < plantList.Count; i++)
|
|
for (int i = 0; i < plantList.Count; i++)
|
|
{
|
|
{
|
|
@@ -629,9 +645,9 @@ public class VisitManager : Regist
|
|
|
|
|
|
ResourceManager.Save(PlayerManager.Player);
|
|
ResourceManager.Save(PlayerManager.Player);
|
|
|
|
|
|
- ResourceManager.TraDic.Remove(PlayerLabel.Player);
|
|
|
|
|
|
+ ResourceManager.TransformDictionary.Remove(PlayerLabel.Player);
|
|
|
|
|
|
- PlayerManager.Instance.GetPlayer(Node).SetAllCollider(false);
|
|
|
|
|
|
+ PlayerManager.Instance.GetPlayer(VisiteeRootNode).SetAllCollider(false);
|
|
|
|
|
|
Garden.PlayerPos = new List<Vector3>();
|
|
Garden.PlayerPos = new List<Vector3>();
|
|
|
|
|
|
@@ -643,17 +659,17 @@ public class VisitManager : Regist
|
|
|
|
|
|
#region Award
|
|
#region Award
|
|
|
|
|
|
- if (Random.Range(0f,1f) <= AwardRate)
|
|
|
|
|
|
+ if (Random.Range(0f,1f) <= CreateAwardRate)
|
|
{
|
|
{
|
|
- if (GardenManager.PlantList.Count > 0)
|
|
|
|
|
|
+ if (GardenManager.PlantSlotList.Count > 0)
|
|
{
|
|
{
|
|
- GardenManager.PlantList.Random()[0].Flower.Award = true;
|
|
|
|
|
|
+ GardenManager.PlantSlotList.Random()[0].PlantFlower.HaveAward = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
- XmlNode nicknameNode = Document.SelectSingleNode(PlayerConfigLabel.RootNode).SelectSingleNode(PlayerConfigLabel.NickName);
|
|
|
|
|
|
+ XmlNode nicknameNode = VisiteeDocument.SelectSingleNode(PlayerConfigLabel.RootNode).SelectSingleNode(PlayerConfigLabel.NickName);
|
|
if (nicknameNode == null || string.IsNullOrEmpty(nicknameNode.Attributes[0].Value))
|
|
if (nicknameNode == null || string.IsNullOrEmpty(nicknameNode.Attributes[0].Value))
|
|
{
|
|
{
|
|
SetVisiteeNickName(Language.GetStr(LanguageLabel.UI__Unnamed));
|
|
SetVisiteeNickName(Language.GetStr(LanguageLabel.UI__Unnamed));
|
|
@@ -666,6 +682,26 @@ public class VisitManager : Regist
|
|
InVisit = true;
|
|
InVisit = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static void ShowVisitFailPanel()
|
|
|
|
+ {
|
|
|
|
+ Bubble.Show
|
|
|
|
+ (
|
|
|
|
+ Language.GetStr(LanguageLabel.UI__C_VisitFail),
|
|
|
|
+ null,
|
|
|
|
+ null,
|
|
|
|
+ null,
|
|
|
|
+ () =>
|
|
|
|
+ {
|
|
|
|
+ ResourceManager.Get(ObjectLabel.I_BlackMask).TweenForCG();
|
|
|
|
+ ResourceManager.SetActive(ObjectLabel.C_EnterPlazaRoom0, true);
|
|
|
|
+ },
|
|
|
|
+ null,
|
|
|
|
+ false
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ Manager.AddCoin(VisitCost, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.VisitRefund);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
public static void SetPlayerRankPanel()
|
|
public static void SetPlayerRankPanel()
|
|
{
|
|
{
|
|
@@ -677,15 +713,15 @@ public class VisitManager : Regist
|
|
{
|
|
{
|
|
SocialManager.PraiseText.text = HttpManager.PraiseAmt.ToString();
|
|
SocialManager.PraiseText.text = HttpManager.PraiseAmt.ToString();
|
|
|
|
|
|
- SocialManager.PraiseBtn.interactable = false;
|
|
|
|
- SocialManager.PraiseBtn.image.color = Color.white;
|
|
|
|
|
|
+ SocialManager.PraiseButton.interactable = false;
|
|
|
|
+ SocialManager.PraiseButton.image.color = Color.white;
|
|
}
|
|
}
|
|
|
|
|
|
public static void SetVisiteePraise(XmlDocument document)
|
|
public static void SetVisiteePraise(XmlDocument document)
|
|
{
|
|
{
|
|
- SocialManager.PraiseText.text = VisiteePraise.ToString();
|
|
|
|
|
|
+ SocialManager.PraiseText.text = VisiteePraiseAmt.ToString();
|
|
//Debug.Log(VisiteeSerialNumber);
|
|
//Debug.Log(VisiteeSerialNumber);
|
|
- HttpManager.Target
|
|
|
|
|
|
+ HttpManager.CheckIsPraised
|
|
(
|
|
(
|
|
HttpManager.SerialNumber,
|
|
HttpManager.SerialNumber,
|
|
VisiteeSerialNumber,
|
|
VisiteeSerialNumber,
|
|
@@ -706,7 +742,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
public static void SetPlayerCommentPanel()
|
|
public static void SetPlayerCommentPanel()
|
|
{
|
|
{
|
|
- if (SocialManager.CommentRecordFlag)
|
|
|
|
|
|
+ if (SocialManager.OpenCommentFlag)
|
|
{
|
|
{
|
|
SocialManager.RecoverCommentPanel();
|
|
SocialManager.RecoverCommentPanel();
|
|
}
|
|
}
|
|
@@ -718,7 +754,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
public static void SetVisiteeCommentPanel()
|
|
public static void SetVisiteeCommentPanel()
|
|
{
|
|
{
|
|
- SocialManager.ClearComment();
|
|
|
|
|
|
+ SocialManager.ClearCommentPanel();
|
|
|
|
|
|
//ManaSocial.UpdatePage(false);
|
|
//ManaSocial.UpdatePage(false);
|
|
}
|
|
}
|
|
@@ -735,40 +771,39 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public static void UpdateCost()
|
|
|
|
|
|
+ public static void UpdateVisitCost()
|
|
{
|
|
{
|
|
- if (Complete)
|
|
|
|
|
|
+ if (Inited)
|
|
{
|
|
{
|
|
- Cost = Mathf.FloorToInt((float)Auxiliary.FmlParse(CostFml, "l", Manager.Level.ToString()));
|
|
|
|
|
|
+ VisitCost = Mathf.FloorToInt((float)Auxiliary.FmlParse(VisitCostFml, "l", Manager.GardenLevel.ToString()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public static void DataReverse()
|
|
|
|
|
|
+ public static void ReverseConfigData()
|
|
{
|
|
{
|
|
if (InVisit)
|
|
if (InVisit)
|
|
{
|
|
{
|
|
- VisitPlantList = new List<Slot>(GardenManager.PlantList);
|
|
|
|
|
|
+ VisiteePlantList = new List<Slot>(GardenManager.PlantSlotList);
|
|
|
|
|
|
- GardenManager.PlantList = OriginPlantList;
|
|
|
|
|
|
+ GardenManager.PlantSlotList = PlayerPlantList;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public static void DataRecover()
|
|
|
|
|
|
+ public static void RecoverConfigData()
|
|
{
|
|
{
|
|
if (InVisit)
|
|
if (InVisit)
|
|
{
|
|
{
|
|
- GardenManager.PlantList = VisitPlantList;
|
|
|
|
|
|
+ GardenManager.PlantSlotList = VisiteePlantList;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- private static int TipAmt = 10;
|
|
|
|
public static void ShowTip()
|
|
public static void ShowTip()
|
|
{
|
|
{
|
|
ResourceManager.SetActive (ObjectLabel.C_Tip, true);
|
|
ResourceManager.SetActive (ObjectLabel.C_Tip, true);
|
|
|
|
|
|
- string languageID = LanguageLabel.Tip + Random.Range(1, TipAmt);
|
|
|
|
|
|
+ string languageID = LanguageLabel.Tip + Random.Range(1, MaxTipAmt);
|
|
ResourceManager.Get<Text> (ObjectLabel.C_TipLab).text = Language.GetStr (LabelUtility.CombineLanguageLabel(LanguageLabel.Tip, languageID));
|
|
ResourceManager.Get<Text> (ObjectLabel.C_TipLab).text = Language.GetStr (LabelUtility.CombineLanguageLabel(LanguageLabel.Tip, languageID));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -778,9 +813,9 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public static void Visit(ArchiveSource archiveSource, string info = null)
|
|
|
|
|
|
+ public static void Visit(ConfigSource configSource, string info = null)
|
|
{
|
|
{
|
|
- if (Manager.SceneSwitchLock)
|
|
|
|
|
|
+ if (Manager.SceneSwitchFlag)
|
|
{
|
|
{
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -790,16 +825,16 @@ public class VisitManager : Regist
|
|
Manager.Pay
|
|
Manager.Pay
|
|
(
|
|
(
|
|
"",
|
|
"",
|
|
- Cost,
|
|
|
|
|
|
+ VisitCost,
|
|
Current.Coin,
|
|
Current.Coin,
|
|
() =>
|
|
() =>
|
|
{
|
|
{
|
|
ResourceManager.Get(ObjectLabel.I_BlackMask).GetTweenCG().Duration = 0.5f;
|
|
ResourceManager.Get(ObjectLabel.I_BlackMask).GetTweenCG().Duration = 0.5f;
|
|
|
|
|
|
- LoadComplete = false;
|
|
|
|
- TweenComplete = false;
|
|
|
|
|
|
+ IsPullConfigComplete = false;
|
|
|
|
+ IsBlackMaskTweenComplete = false;
|
|
|
|
|
|
- GetArchive(archiveSource, info);
|
|
|
|
|
|
+ PullConfig(configSource, info);
|
|
|
|
|
|
AudioManager.PlayClip(AudioLabel.Bubble);
|
|
AudioManager.PlayClip(AudioLabel.Bubble);
|
|
|
|
|
|
@@ -807,7 +842,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
TweenRoot tween;
|
|
TweenRoot tween;
|
|
|
|
|
|
- if (CoolTime != 0)
|
|
|
|
|
|
+ if (VisitCDTime != 0)
|
|
{
|
|
{
|
|
ResourceManager.Get<Button>(ObjectLabel.C_Visit).interactable = false;
|
|
ResourceManager.Get<Button>(ObjectLabel.C_Visit).interactable = false;
|
|
|
|
|
|
@@ -831,7 +866,7 @@ public class VisitManager : Regist
|
|
EventType.BackwardFinish,
|
|
EventType.BackwardFinish,
|
|
() =>
|
|
() =>
|
|
{
|
|
{
|
|
- TweenComplete = true;
|
|
|
|
|
|
+ IsBlackMaskTweenComplete = true;
|
|
|
|
|
|
EnterVisiteeGarden();
|
|
EnterVisiteeGarden();
|
|
}
|
|
}
|
|
@@ -843,20 +878,20 @@ public class VisitManager : Regist
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
- public static void GetArchive(ArchiveSource archiveSource, string info = null)
|
|
|
|
|
|
+ public static void PullConfig(ConfigSource configSource, string info = null)
|
|
{
|
|
{
|
|
- if (archiveSource == ArchiveSource.SerialNumber)
|
|
|
|
|
|
+ if (configSource == ConfigSource.SerialNumber)
|
|
{
|
|
{
|
|
- HttpManager.Other
|
|
|
|
|
|
+ HttpManager.GetTargetConfig
|
|
(
|
|
(
|
|
info,
|
|
info,
|
|
data =>
|
|
data =>
|
|
{
|
|
{
|
|
VisiteeSerialNumber = info;
|
|
VisiteeSerialNumber = info;
|
|
- PullArchiveCallback
|
|
|
|
|
|
+ PullConfigCallback
|
|
(
|
|
(
|
|
data,
|
|
data,
|
|
- ShowFailPanel,
|
|
|
|
|
|
+ ShowVisitFailPanel,
|
|
(jData) =>
|
|
(jData) =>
|
|
{
|
|
{
|
|
XmlDocument document = new XmlDocument();
|
|
XmlDocument document = new XmlDocument();
|
|
@@ -867,7 +902,7 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
);
|
|
);
|
|
}
|
|
}
|
|
- else if (archiveSource == ArchiveSource.Random)
|
|
|
|
|
|
+ else if (configSource == ConfigSource.Random)
|
|
{
|
|
{
|
|
if (UnusedDataList.Count > 0)
|
|
if (UnusedDataList.Count > 0)
|
|
{
|
|
{
|
|
@@ -882,12 +917,12 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- ShowFailPanel();
|
|
|
|
|
|
+ ShowVisitFailPanel();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public static void PullArchiveCallback(JsonData jsonData, Action failed, Action<JsonData> succeed)
|
|
|
|
|
|
+ public static void PullConfigCallback(JsonData jsonData, Action failed, Action<JsonData> succeed)
|
|
{
|
|
{
|
|
if (jsonData.Inst_Object.ContainsKey("l"))
|
|
if (jsonData.Inst_Object.ContainsKey("l"))
|
|
{
|
|
{
|
|
@@ -901,7 +936,7 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public static void SavePulledArchive(JsonData jsonData)
|
|
|
|
|
|
+ public static void SavePulledConfig(JsonData jsonData)
|
|
{
|
|
{
|
|
//Debug.Log(jsonData.ToJson());
|
|
//Debug.Log(jsonData.ToJson());
|
|
XmlDocument document = new XmlDocument();
|
|
XmlDocument document = new XmlDocument();
|
|
@@ -913,43 +948,7 @@ public class VisitManager : Regist
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public static void EnterVisiteeGarden(VisitData visitData)
|
|
|
|
- {
|
|
|
|
- LoadComplete = true;
|
|
|
|
- VisiteePraise = int.Parse(visitData.JsonData["p"].ToString());
|
|
|
|
- if (visitData.JsonData.Inst_Object.ContainsKey("i"))
|
|
|
|
- {
|
|
|
|
- VisiteeSerialNumber = visitData.JsonData["i"].ToString();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- Document = visitData.Document;
|
|
|
|
-
|
|
|
|
- SetVisiteeCommentPanel();
|
|
|
|
-
|
|
|
|
- EnterVisiteeGarden();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static void ShowFailPanel()
|
|
|
|
- {
|
|
|
|
- Bubble.Show
|
|
|
|
- (
|
|
|
|
- Language.GetStr(LanguageLabel.UI__C_VisitFail),
|
|
|
|
- null,
|
|
|
|
- null,
|
|
|
|
- null,
|
|
|
|
- () =>
|
|
|
|
- {
|
|
|
|
- ResourceManager.Get(ObjectLabel.I_BlackMask).TweenForCG();
|
|
|
|
- ResourceManager.SetActive(ObjectLabel.C_EnterPlazaRoom0, true);
|
|
|
|
- },
|
|
|
|
- null,
|
|
|
|
- false
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- Manager.AddCoin(Cost, StaticsManager.ItemID.获得金币, StaticsManager.ConsumeModule.VisitRefund);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public static string CreateArchive()
|
|
|
|
|
|
+ public static string CreateFakeConfig()
|
|
{
|
|
{
|
|
XmlDocument doc = new XmlDocument();
|
|
XmlDocument doc = new XmlDocument();
|
|
|
|
|
|
@@ -969,13 +968,13 @@ public class VisitManager : Regist
|
|
|
|
|
|
if (type == SkillType.Ability)
|
|
if (type == SkillType.Ability)
|
|
{
|
|
{
|
|
- Ability ability = (Ability)Manager.SkillDic[nodeList[i].Attributes[0].Value];
|
|
|
|
|
|
+ Ability ability = (Ability)Manager.SkillDictionary[nodeList[i].Attributes[0].Value];
|
|
|
|
|
|
int unlockLevel = ability.UnlockLv;
|
|
int unlockLevel = ability.UnlockLv;
|
|
|
|
|
|
if (newLevel >= unlockLevel)
|
|
if (newLevel >= unlockLevel)
|
|
{
|
|
{
|
|
- if (ability.ID_ >= 6)
|
|
|
|
|
|
+ if (ability.ID >= 6)
|
|
{
|
|
{
|
|
slot++;
|
|
slot++;
|
|
}
|
|
}
|
|
@@ -995,7 +994,7 @@ public class VisitManager : Regist
|
|
|
|
|
|
#region 随机种一些花
|
|
#region 随机种一些花
|
|
|
|
|
|
- bool fancy = Random.Range(0f, 1f) < FancyRate; //fancy=True时 种的花比较多
|
|
|
|
|
|
+ bool fancy = Random.Range(0f, 1f) < FancyGardenRate; //fancy=True时 种的花比较多
|
|
|
|
|
|
List<int> flowerList = new List<int>();
|
|
List<int> flowerList = new List<int>();
|
|
|
|
|
|
@@ -1031,12 +1030,12 @@ public class VisitManager : Regist
|
|
xmlNode.Attributes[0].Value = "";
|
|
xmlNode.Attributes[0].Value = "";
|
|
|
|
|
|
|
|
|
|
- xmlNode.Attributes[0].Value = PlayerManager.CloseItemDic[Random.Range(2, (int)Mathf.Lerp(2, 30, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
- xmlNode.Attributes[1].Value = PlayerManager.CloseItemDic[Random.Range(201, (int)Mathf.Lerp(201, 217, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
- xmlNode.Attributes[2].Value = PlayerManager.CloseItemDic[Random.Range(401, (int)Mathf.Lerp(401, 415, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
- xmlNode.Attributes[3].Value = PlayerManager.CloseItemDic[Random.Range(601, (int)Mathf.Lerp(601, 612, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
- xmlNode.Attributes[4].Value = PlayerManager.CloseItemDic[Random.Range(801, (int)Mathf.Lerp(801, 817, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
- xmlNode.Attributes[7].Value = PlayerManager.CloseItemDic[Random.Range(1001, (int)Mathf.Lerp(1001, 1003, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
|
|
+ xmlNode.Attributes[0].Value = PlayerManager.CloseItemDictionary[Random.Range(2, (int)Mathf.Lerp(2, 30, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
+ xmlNode.Attributes[1].Value = PlayerManager.CloseItemDictionary[Random.Range(201, (int)Mathf.Lerp(201, 217, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
+ xmlNode.Attributes[2].Value = PlayerManager.CloseItemDictionary[Random.Range(401, (int)Mathf.Lerp(401, 415, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
+ xmlNode.Attributes[3].Value = PlayerManager.CloseItemDictionary[Random.Range(601, (int)Mathf.Lerp(601, 612, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
+ xmlNode.Attributes[4].Value = PlayerManager.CloseItemDictionary[Random.Range(801, (int)Mathf.Lerp(801, 817, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
+ xmlNode.Attributes[7].Value = PlayerManager.CloseItemDictionary[Random.Range(1001, (int)Mathf.Lerp(1001, 1003, newLevel / 449f) + 1)].ArmatureName;
|
|
|
|
|
|
#region 随机选一套眼睛嘴巴
|
|
#region 随机选一套眼睛嘴巴
|
|
|
|
|