|
@@ -21,10 +21,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_AD = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.AD] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.AD].Invoke(_AD);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.AD, _AD);
|
|
|
}
|
|
|
}
|
|
|
public static double Skill
|
|
@@ -34,10 +31,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_Skill = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.Skill] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.Skill].Invoke(_Skill);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.Skill, _Skill);
|
|
|
}
|
|
|
}
|
|
|
public static double Sign
|
|
@@ -47,10 +41,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_Sign = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.Sign] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.Sign].Invoke(_Sign);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.Sign, _Sign);
|
|
|
}
|
|
|
}
|
|
|
public static double Share
|
|
@@ -60,10 +51,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_Share = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.Share] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.Share].Invoke(_Share);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.Share, _Share);
|
|
|
}
|
|
|
}
|
|
|
public static double ElfLevel
|
|
@@ -73,10 +61,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_ElfLevel = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.ElfLevel] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.ElfLevel].Invoke(_ElfLevel);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.ElfLevel, _ElfLevel);
|
|
|
}
|
|
|
}
|
|
|
public static double TotalCoin
|
|
@@ -86,10 +71,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_TotalCoin = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.TotalCoin] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.TotalCoin].Invoke(_TotalCoin);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.TotalCoin, _TotalCoin);
|
|
|
}
|
|
|
}
|
|
|
public static double MiniGame
|
|
@@ -99,10 +81,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_MiniGame = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.MiniGame] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.MiniGame].Invoke(_MiniGame);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.MiniGame, _MiniGame);
|
|
|
}
|
|
|
}
|
|
|
public static double FlowerCoin
|
|
@@ -111,11 +90,8 @@ public class ManaData : Regist
|
|
|
set
|
|
|
{
|
|
|
_FlowerCoin = value;
|
|
|
-
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.FlowerCoin] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.FlowerCoin].Invoke(_FlowerCoin);
|
|
|
- }
|
|
|
+
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.FlowerCoin, _FlowerCoin);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -154,10 +130,7 @@ public class ManaData : Regist
|
|
|
SkillList[i].UpdateStatus();
|
|
|
}
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.GardenLevel] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.GardenLevel].Invoke(_Level);
|
|
|
- }
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.Garden, _Level);
|
|
|
}
|
|
|
}
|
|
|
public static bool Pause
|
|
@@ -188,12 +161,9 @@ public class ManaData : Regist
|
|
|
{
|
|
|
_Person = value;
|
|
|
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.Person] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.Person].Invoke(_Person);
|
|
|
- }
|
|
|
-
|
|
|
ManaReso.SetText("F_PersonLab", _Person.ToString("0.0"));
|
|
|
+
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.Person, _Person);
|
|
|
}
|
|
|
}
|
|
|
public static float CoinPerson
|
|
@@ -220,11 +190,8 @@ public class ManaData : Regist
|
|
|
|
|
|
ManaReso.SetText("F_CoinLab", _Coin.ToString("0"));
|
|
|
ManaReso.SetText("C_CoinLab", _Coin.ToString("0"));
|
|
|
-
|
|
|
- if (ManaAchieve.DeleDic[AchieveType.CurrentCoin] != null)
|
|
|
- {
|
|
|
- ManaAchieve.DeleDic[AchieveType.CurrentCoin].Invoke(_Coin);
|
|
|
- }
|
|
|
+
|
|
|
+ ManaAchieve.UpdateStatus(AchieveType.CurrentCoin, _Coin);
|
|
|
}
|
|
|
}
|
|
|
public static double Diamond
|
|
@@ -246,93 +213,58 @@ public class ManaData : Regist
|
|
|
private static double _Coin;
|
|
|
private static double _Diamond;
|
|
|
|
|
|
- public static float SkillPlus;
|
|
|
- public static float SkillPerson;
|
|
|
- public static float SkillPersonBuff;
|
|
|
- public static float SkillCoinPerson;
|
|
|
-
|
|
|
- public static int Main;
|
|
|
- public static int SignIndex;
|
|
|
- public static bool Mini;
|
|
|
- public static bool SkillBar;
|
|
|
- public static bool Connect;
|
|
|
- public static float OpTime;
|
|
|
- public static float OpTimer;
|
|
|
- public static float MiniTimer;
|
|
|
- public static float CircleTime;
|
|
|
- public static float CircleTimer;
|
|
|
- public static float NewPerson;
|
|
|
- public static float NewCoinPerson;
|
|
|
-
|
|
|
- public static List<Skill> CoolList;
|
|
|
- public static List<SkillRoot> UseList;
|
|
|
- public static List<SkillRoot> SkillList;
|
|
|
- public static Dictionary<string, SkillRoot> SkillDic;
|
|
|
-
|
|
|
- #endregion
|
|
|
-
|
|
|
- public override void Instantiate()
|
|
|
+ public static List<SkillRoot> SkillList
|
|
|
{
|
|
|
- #region 生成技能条
|
|
|
-
|
|
|
- #region 读技能配置
|
|
|
-
|
|
|
- SkillDic = new Dictionary<string, SkillRoot>();
|
|
|
- SkillList = new List<SkillRoot>();
|
|
|
-
|
|
|
- List<XmlAttributeCollection> attributesList = Data.GetSkillConfig();
|
|
|
-
|
|
|
- for (int i = 0; i < attributesList.Count; i++)
|
|
|
+ get
|
|
|
{
|
|
|
- SkillRoot skillRoot;
|
|
|
-
|
|
|
- #region MyRegion
|
|
|
-
|
|
|
- if (attributesList[i].Count == 17)
|
|
|
- {
|
|
|
- skillRoot = new Pack(attributesList[i]);
|
|
|
- }
|
|
|
- else if (attributesList[i].Count == 23)
|
|
|
+ if (_SkillList == null)
|
|
|
{
|
|
|
- skillRoot = new Ability(attributesList[i]);
|
|
|
+ _SkillList = new List<SkillRoot>();
|
|
|
}
|
|
|
- else if (attributesList[i].Count == 33)
|
|
|
- {
|
|
|
- if (string.IsNullOrEmpty(attributesList[i][4].Value))
|
|
|
- {
|
|
|
- skillRoot = new Skill(attributesList[i]);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- skillRoot = new BigSkill(attributesList[i]);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
+
|
|
|
+ return _SkillList;
|
|
|
+ }
|
|
|
+ set { _SkillList = value; }
|
|
|
+ }
|
|
|
+ public static Dictionary<string, SkillRoot> SkillDic
|
|
|
+ {
|
|
|
+ get
|
|
|
+ {
|
|
|
+ if (_SkillDic == null)
|
|
|
{
|
|
|
- throw new Exception(attributesList[i].Count.ToString());
|
|
|
+ _SkillDic = new Dictionary<string, SkillRoot>();
|
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
- SkillDic.Add(skillRoot._Name, skillRoot);
|
|
|
- SkillList.Add(skillRoot);
|
|
|
+ return _SkillDic;
|
|
|
}
|
|
|
+ set { _SkillDic = value; }
|
|
|
+ }
|
|
|
|
|
|
- SkillList.Sort(SkillRoot.Sort);
|
|
|
+ public static List<SkillRoot> _SkillList;
|
|
|
+ public static Dictionary<string, SkillRoot> _SkillDic;
|
|
|
|
|
|
- #endregion
|
|
|
+ public static int SignIndex;
|
|
|
+ public static int MainDepth;
|
|
|
+ public static bool Mini;
|
|
|
+ public static bool SkillBar;
|
|
|
+ public static bool Connect;
|
|
|
+ public static float OpTime = 90;
|
|
|
+ public static float OpTimer;
|
|
|
+ public static float MiniTimer;
|
|
|
+ public static float CircleTime = 10;
|
|
|
+ public static float CircleTimer;
|
|
|
+ public static float NewPerson;
|
|
|
+ public static float NewCoinPerson;
|
|
|
|
|
|
- for (int i = 0; i < SkillList.Count; i++)
|
|
|
- {
|
|
|
- if (SkillList[i].SkillTab != SkillTab.Null)
|
|
|
- {
|
|
|
- ManaReso.GetSkillItem(SkillList[i]);
|
|
|
- }
|
|
|
- }
|
|
|
+ public static float SkillPlus;
|
|
|
+ public static float SkillPerson;
|
|
|
+ public static float SkillPersonBuff;
|
|
|
+ public static float SkillCoinPerson;
|
|
|
|
|
|
- #endregion
|
|
|
- }
|
|
|
+ public static List<Skill> CoolList = new List<Skill>();
|
|
|
+ public static List<SkillRoot> UseList = new List<SkillRoot>();
|
|
|
|
|
|
+ #endregion
|
|
|
|
|
|
private void Update()
|
|
|
{
|
|
@@ -374,7 +306,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
OpTimer = 0;
|
|
|
|
|
|
- if (Main == 0)
|
|
|
+ if (MainDepth == 0)
|
|
|
{
|
|
|
ManaReso.Get("C_Main").TweenForCG();
|
|
|
}
|
|
@@ -387,7 +319,7 @@ public class ManaData : Regist
|
|
|
{
|
|
|
OpTimer = 0;
|
|
|
|
|
|
- if (Main == -1)
|
|
|
+ if (MainDepth == -1)
|
|
|
{
|
|
|
ManaReso.Get("C_Main").TweenBacCG();
|
|
|
}
|
|
@@ -407,7 +339,7 @@ public class ManaData : Regist
|
|
|
RegularFixedUpdate();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void TutorialFixedUpdate()
|
|
|
{
|
|
|
|
|
@@ -415,7 +347,7 @@ public class ManaData : Regist
|
|
|
|
|
|
private void RegularFixedUpdate()
|
|
|
{
|
|
|
- #region 使用技能
|
|
|
+ #region 技能
|
|
|
|
|
|
for (int i = 0; i < UseList.Count; i++)
|
|
|
{
|
|
@@ -425,10 +357,6 @@ public class ManaData : Regist
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region 冷却技能
|
|
|
-
|
|
|
for (int i = 0; i < CoolList.Count; i++)
|
|
|
{
|
|
|
if (CoolList[i].DoCool())
|
|
@@ -439,7 +367,7 @@ public class ManaData : Regist
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
- #region 计算参观收入
|
|
|
+ #region 参观收入
|
|
|
|
|
|
CircleTimer -= Time.deltaTime;
|
|
|
|
|
@@ -454,9 +382,9 @@ public class ManaData : Regist
|
|
|
|
|
|
Coin += temp;
|
|
|
|
|
|
- if (Main == -1)
|
|
|
+ if (MainDepth == -1)
|
|
|
{
|
|
|
- ManaReso.GetHudText("+" + temp.ToString("0"), ManaColor.HudText, 25, ManaReso.Get("C_HudTra"), ManaReso.Get("C_Main"), false);
|
|
|
+ ManaReso.GetHudText("+" + temp.ToString("0"), Color.white, 25, ManaReso.Get("C_PosTra"), ManaReso.Get("C_Main"), false);
|
|
|
}
|
|
|
|
|
|
ManaDebug.Log(string.Format("参观收益<color=red>{0:0}</color> = <color=red>{1}</color> * <color=red>{2}</color> * <color=red>{3}</color> * <color=red>{4}</color> (人次*金币*时间*加成)", temp, NewPerson, NewCoinPerson, CircleTime, 1 + SkillPlus));
|
|
@@ -466,71 +394,112 @@ public class ManaData : Regist
|
|
|
}
|
|
|
|
|
|
|
|
|
- public override void RegistValueA()
|
|
|
+ public override void Instantiate()
|
|
|
{
|
|
|
- OpTime = 90;
|
|
|
- MiniTimer = 0;
|
|
|
- CircleTime = 10;
|
|
|
+ #region 生成技能条
|
|
|
|
|
|
- #region 调试
|
|
|
+ #region 读技能配置
|
|
|
|
|
|
- if (ManaReso.Get("B_SignIn").gameObject.activeSelf)
|
|
|
+ List<XmlAttributeCollection> attributeList = Data.GetSkillConfig();
|
|
|
+
|
|
|
+ for (int i = 0; i < attributeList.Count; i++)
|
|
|
{
|
|
|
- Main = 1;
|
|
|
+ SkillRoot skillRoot;
|
|
|
+
|
|
|
+ #region MyRegion
|
|
|
+
|
|
|
+ if (attributeList[i].Count == 17)
|
|
|
+ {
|
|
|
+ skillRoot = new Pack(attributeList[i]);
|
|
|
+ }
|
|
|
+ else if (attributeList[i].Count == 23)
|
|
|
+ {
|
|
|
+ skillRoot = new Ability(attributeList[i]);
|
|
|
+ }
|
|
|
+ else if (attributeList[i].Count == 33)
|
|
|
+ {
|
|
|
+ if (string.IsNullOrEmpty(attributeList[i][4].Value))
|
|
|
+ {
|
|
|
+ skillRoot = new Skill(attributeList[i]);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ skillRoot = new BigSkill(attributeList[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ throw new Exception(attributeList[i].Count.ToString());
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ SkillDic.Add(skillRoot._Name, skillRoot);
|
|
|
+ SkillList.Add(skillRoot);
|
|
|
}
|
|
|
- else
|
|
|
+
|
|
|
+ SkillList.Sort(SkillRoot.Sort);
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ for (int i = 0; i < SkillList.Count; i++)
|
|
|
{
|
|
|
- Main = 0;
|
|
|
+ if (SkillList[i].SkillTab != SkillTab.Null)
|
|
|
+ {
|
|
|
+ ManaReso.GetSkillItem(SkillList[i]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
+ }
|
|
|
|
|
|
- #region 读数据存档
|
|
|
-
|
|
|
- SignIndex = int.Parse(Data.PlayerNode.SelectSingleNode("SignIndex").Attributes[0].Value);
|
|
|
- ManaMiniGame.MiniGameAmt = int.Parse(Data.PlayerNode.SelectSingleNode("MiniGameAmt").Attributes[0].Value);
|
|
|
+ public override void RegistValueA()
|
|
|
+ {
|
|
|
+ if (ManaReso.Get("B_SignIn").gameObject.activeSelf)
|
|
|
+ {
|
|
|
+ MainDepth = 1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MainDepth = 0;
|
|
|
+ }
|
|
|
|
|
|
- CircleTimer = float.Parse(Data.PlayerNode.SelectSingleNode("CircleTimer").Attributes[0].Value);
|
|
|
+ #region 读数据存档
|
|
|
|
|
|
- int slot = int.Parse(Data.PlayerNode.SelectSingleNode("Slot").Attributes[0].Value);
|
|
|
+ SignIndex = Data.PlayerInt("SignIndex");
|
|
|
+ CircleTimer = Data.PlayerFloat("CircleTimer");
|
|
|
|
|
|
- for (int i = 0; i < slot; i++)
|
|
|
+ for (int i = 0; i < Data.PlayerInt("Slot"); i++)
|
|
|
{
|
|
|
ManaGarden.UnlockSlot();
|
|
|
}
|
|
|
|
|
|
- AD = double.Parse(Data.PlayerNode.SelectSingleNode("AchieveData").Attributes[0].Value);
|
|
|
- Skill = double.Parse(Data.PlayerNode.SelectSingleNode("AchieveData").Attributes[1].Value);
|
|
|
- Sign = double.Parse(Data.PlayerNode.SelectSingleNode("AchieveData").Attributes[2].Value);
|
|
|
- Share = double.Parse(Data.PlayerNode.SelectSingleNode("AchieveData").Attributes[3].Value);
|
|
|
- MiniGame = double.Parse(Data.PlayerNode.SelectSingleNode("AchieveData").Attributes[4].Value);
|
|
|
- FlowerCoin = double.Parse(Data.PlayerNode.SelectSingleNode("AchieveData").Attributes[5].Value);
|
|
|
+ List<double> dataList = Data.GetAchieveData();
|
|
|
+
|
|
|
+ AD = dataList[0];
|
|
|
+ Skill = dataList[1];
|
|
|
+ Sign = dataList[2];
|
|
|
+ Share = dataList[3];
|
|
|
+ MiniGame = dataList[4];
|
|
|
+ FlowerCoin = dataList[5];
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 读花朵存档
|
|
|
|
|
|
- XmlAttributeCollection attributes = Data.PlayerNode.SelectSingleNode("FlowerList").Attributes;
|
|
|
+ List<int> flowerList = Data.GetFlowerList();
|
|
|
|
|
|
- if (!string.IsNullOrEmpty(attributes[0].Value))
|
|
|
+ for (int i = 0; i < flowerList.Count; i++)
|
|
|
{
|
|
|
- string[] strings = attributes[0].Value.Split(' ');
|
|
|
-
|
|
|
- for (int i = 0; i < strings.Length; i++)
|
|
|
- {
|
|
|
- int id = int.Parse(strings[i]);
|
|
|
-
|
|
|
- ManaGarden.FlowerInfoList[id].Unlock = true;
|
|
|
- }
|
|
|
+ ManaGarden.FlowerInfoList[flowerList[i]].Unlock = true;
|
|
|
}
|
|
|
|
|
|
- attributes = Data.PlayerNode.SelectSingleNode("PlantList").Attributes;
|
|
|
|
|
|
- for (int i = 0; i < attributes.Count; i++)
|
|
|
- {
|
|
|
- int id = int.Parse(attributes[i].Value);
|
|
|
+ List<KV<int, string>> plantList = Data.GetPlantList();
|
|
|
|
|
|
- ManaGarden.PlantFlower(id, attributes[i].Name);
|
|
|
+ for (int i = 0; i < plantList.Count; i++)
|
|
|
+ {
|
|
|
+ ManaGarden.PlantFlower(plantList[i].Key, plantList[i].Value);
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -540,9 +509,6 @@ public class ManaData : Regist
|
|
|
{
|
|
|
#region 读技能存档
|
|
|
|
|
|
- UseList = new List<SkillRoot>();
|
|
|
- CoolList = new List<Skill>();
|
|
|
-
|
|
|
float elapse = (float) DateTime.Now.Subtract(DateTime.Parse(Data.PlayerNode.SelectSingleNode("QuitTime").Attributes[0].Value)).TotalSeconds;
|
|
|
|
|
|
if (elapse > 43200)
|
|
@@ -552,8 +518,6 @@ public class ManaData : Regist
|
|
|
|
|
|
ManaDebug.Log(string.Format("离线时间<color=red>{0}</color>", elapse));
|
|
|
|
|
|
- XmlNodeList xmlNodeList = Data.PlayerNode.SelectSingleNode("SkillList").ChildNodes;
|
|
|
-
|
|
|
List<SkillRoot> ffCoolList = new List<SkillRoot>();
|
|
|
List<List<SkillRoot>> ffUseList = new List<List<SkillRoot>>();
|
|
|
|
|
@@ -573,79 +537,28 @@ public class ManaData : Regist
|
|
|
ManaDebug.Log(string.Format("离线周期<color=red>{0}</color>", 0));
|
|
|
}
|
|
|
|
|
|
- for (int i = 0; i < xmlNodeList.Count; i++)
|
|
|
- {
|
|
|
- if (xmlNodeList[i].Attributes[0].Value == SkillType.Skill.ToString())
|
|
|
- {
|
|
|
- Skill skill = (Skill)SkillDic[xmlNodeList[i].Name];
|
|
|
-
|
|
|
- skill.RegistReference();
|
|
|
-
|
|
|
- skill.Level = int.Parse(xmlNodeList[i].Attributes[2].Value);
|
|
|
- skill.CoolTimer = float.Parse(xmlNodeList[i].Attributes[3].Value);
|
|
|
- skill.UseTimer = float.Parse(xmlNodeList[i].Attributes[4].Value);
|
|
|
+ List<XmlAttributeCollection> attributeList = Data.GetSkillList();
|
|
|
|
|
|
- skill._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
|
|
|
-
|
|
|
- skill.RegistValue(elapse, ffUseList);
|
|
|
- }
|
|
|
- else if (xmlNodeList[i].Attributes[0].Value == SkillType.BigSkill.ToString())
|
|
|
- {
|
|
|
- BigSkill bigSkill = (BigSkill)SkillDic[xmlNodeList[i].Name];
|
|
|
-
|
|
|
- bigSkill.RegistReference();
|
|
|
-
|
|
|
- bigSkill.Level = int.Parse(xmlNodeList[i].Attributes[3].Value);
|
|
|
- bigSkill.CoolTimer = float.Parse(xmlNodeList[i].Attributes[4].Value);
|
|
|
- bigSkill.UseTimer = float.Parse(xmlNodeList[i].Attributes[5].Value);
|
|
|
-
|
|
|
- bigSkill._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
|
|
|
- bigSkill._BarStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value);
|
|
|
-
|
|
|
- bigSkill.RegistValue(elapse, ffUseList);
|
|
|
- }
|
|
|
- else if (xmlNodeList[i].Attributes[0].Value == SkillType.Pack.ToString())
|
|
|
- {
|
|
|
- Pack pack = (Pack)SkillDic[xmlNodeList[i].Attributes[1].Value];
|
|
|
-
|
|
|
- pack.RegistReference();
|
|
|
-
|
|
|
- pack.Level = int.Parse(xmlNodeList[i].Attributes[3].Value);
|
|
|
-
|
|
|
- pack._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value);
|
|
|
-
|
|
|
- pack.RegistValue(elapse, ffUseList);
|
|
|
- }
|
|
|
- else if (xmlNodeList[i].Attributes[0].Value == SkillType.Ability.ToString())
|
|
|
- {
|
|
|
- Ability ability = (Ability)SkillDic[xmlNodeList[i].Name];
|
|
|
-
|
|
|
- ability.RegistReference();
|
|
|
-
|
|
|
- ability.Level = int.Parse(xmlNodeList[i].Attributes[2].Value);
|
|
|
+ for (int i = 0; i < attributeList.Count; i++)
|
|
|
+ {
|
|
|
+ SkillRoot skillRoot = SkillDic[attributeList[i][0].Value];
|
|
|
|
|
|
- ability._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
|
|
|
+ skillRoot.RegistReference();
|
|
|
|
|
|
- ability.RegistValue(elapse, ffUseList);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- throw new Exception();
|
|
|
- }
|
|
|
+ skillRoot.RegistValue(elapse, ffUseList, attributeList[i]);
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 读数据存档
|
|
|
|
|
|
- Level = int.Parse(Data.PlayerNode.SelectSingleNode("Level").Attributes[0].Value);
|
|
|
- MiniTimer = float.Parse(Data.PlayerNode.SelectSingleNode("MiniTimer").Attributes[0].Value);
|
|
|
+ Coin = Data.PlayerDouble("Coin");
|
|
|
+ Level = Data.PlayerInt("Level");
|
|
|
+ Diamond = Data.PlayerDouble("Diamond");
|
|
|
+ MiniTimer = Data.PlayerFloat("MiniTimer");
|
|
|
|
|
|
ManaDebug.Log(string.Format("<color=red>{0:0}</color>秒后激活小游戏", MiniTimer));
|
|
|
|
|
|
- Coin = double.Parse(Data.PlayerNode.SelectSingleNode("Coin").Attributes[0].Value);
|
|
|
- Diamond = double.Parse(Data.PlayerNode.SelectSingleNode("Diamond").Attributes[0].Value);
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
#region 计算离线收入
|
|
@@ -711,9 +624,7 @@ public class ManaData : Regist
|
|
|
|
|
|
public override void TutorialRegistValue()
|
|
|
{
|
|
|
- int slot = int.Parse(Data.PlayerNode.SelectSingleNode("Slot").Attributes[0].Value);
|
|
|
-
|
|
|
- for (int i = 0; i < slot; i++)
|
|
|
+ for (int i = 0; i < Data.PlayerInt("Slot"); i++)
|
|
|
{
|
|
|
ManaGarden.UnlockSlot();
|
|
|
}
|