|
@@ -171,6 +171,11 @@ public class ManaData : MonoBehaviour
|
|
|
{
|
|
|
OpTimer = 0;
|
|
|
|
|
|
+ if (ManaReso.Get("GardenMini").gameObject.activeSelf || ManaReso.Get("F_Manage").gameObject.activeSelf)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
GameObject go = ManaReso.Get("C_Main").gameObject;
|
|
|
|
|
|
if (go.activeSelf == false)
|
|
@@ -257,15 +262,16 @@ public class ManaData : MonoBehaviour
|
|
|
|
|
|
XmlNodeList xmlNodeList = Data.PlayerNode.SelectSingleNode("SkillList").ChildNodes;
|
|
|
|
|
|
- List<List<SkillRoot>> collectList = new List<List<SkillRoot>>();
|
|
|
+ List<SkillRoot> ffCoolList = new List<SkillRoot>();
|
|
|
+ List<List<SkillRoot>> ffList = new List<List<SkillRoot>>();
|
|
|
|
|
|
if (elapse > CircleTimer)
|
|
|
{
|
|
|
- int lastCircle = 1 + Mathf.FloorToInt((float)((elapse - CircleTimer) / CircleTime));
|
|
|
+ int ffCircle = 1 + Mathf.FloorToInt((float)((elapse - CircleTimer) / CircleTime));
|
|
|
|
|
|
- for (int i = 0; i < lastCircle; i++)
|
|
|
+ for (int i = 0; i < ffCircle; i++)
|
|
|
{
|
|
|
- collectList.Add(new List<SkillRoot>());
|
|
|
+ ffList.Add(new List<SkillRoot>());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -283,7 +289,7 @@ public class ManaData : MonoBehaviour
|
|
|
|
|
|
skill._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
|
|
|
|
|
|
- skill.RegistValue(elapse, collectList);
|
|
|
+ skill.RegistValue(elapse, ffList);
|
|
|
}
|
|
|
else if (xmlNodeList[i].Attributes[0].Value == SkillType.BigSkill.ToString())
|
|
|
{
|
|
@@ -298,7 +304,7 @@ public class ManaData : MonoBehaviour
|
|
|
bigSkill._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value); //Sa0
|
|
|
bigSkill._BarStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value); //Sa1
|
|
|
|
|
|
- bigSkill.RegistValue(elapse, collectList);
|
|
|
+ bigSkill.RegistValue(elapse, ffList);
|
|
|
}
|
|
|
else if (xmlNodeList[i].Attributes[0].Value == SkillType.Pack.ToString())
|
|
|
{
|
|
@@ -309,7 +315,7 @@ public class ManaData : MonoBehaviour
|
|
|
pack.Level = int.Parse(xmlNodeList[i].Attributes[3].Value);
|
|
|
pack._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[2].Value);
|
|
|
|
|
|
- pack.RegistValue(elapse, collectList);
|
|
|
+ pack.RegistValue(elapse, ffList);
|
|
|
}
|
|
|
else if (xmlNodeList[i].Attributes[0].Value == SkillType.Ability.ToString())
|
|
|
{
|
|
@@ -320,7 +326,7 @@ public class ManaData : MonoBehaviour
|
|
|
ability.Level = int.Parse(xmlNodeList[i].Attributes[2].Value);
|
|
|
ability._ItemStatus = (SkillStatus)Enum.Parse(typeof(SkillStatus), xmlNodeList[i].Attributes[1].Value);
|
|
|
|
|
|
- ability.RegistValue(elapse, collectList);
|
|
|
+ ability.RegistValue(elapse, ffList);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -375,13 +381,29 @@ public class ManaData : MonoBehaviour
|
|
|
|
|
|
double collectCoin = 0;
|
|
|
|
|
|
- if (collectList.Count > 0)
|
|
|
+ if (ffList.Count > 0)
|
|
|
{
|
|
|
- for (int i = 0; i < collectList.Count; i++)
|
|
|
+ for (int i = 0; i < ffList.Count; i++)
|
|
|
{
|
|
|
- for (int j = 0; j < collectList[i].Count; j++)
|
|
|
+ for (int j = 0; j < ffCoolList.Count; j++)
|
|
|
{
|
|
|
- collectList[i][j].Annul();
|
|
|
+ if (ffCoolList[j].SkillType == SkillType.Skill || ffCoolList[j].SkillType == SkillType.BigSkill)
|
|
|
+ {
|
|
|
+ if (i == 0)
|
|
|
+ {
|
|
|
+ ((Skill) ffCoolList[j]).CoolTimer -= CircleTimer;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ((Skill)ffCoolList[j]).CoolTimer -= CircleTime;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int j = 0; j < ffList[i].Count; j++)
|
|
|
+ {
|
|
|
+ ffList[i][j].Annul();
|
|
|
+ ffCoolList.Add(ffList[i][j]);
|
|
|
}
|
|
|
|
|
|
NewPerson = Person * (1 + SkillPersonBuff) + SkillPerson;
|
|
@@ -391,7 +413,7 @@ public class ManaData : MonoBehaviour
|
|
|
}
|
|
|
|
|
|
Coin += collectCoin;
|
|
|
-
|
|
|
+
|
|
|
ManaReso.SetText("A_IconLab", collectCoin.ToString("0"));
|
|
|
|
|
|
CircleTimer = (float)((elapse - CircleTimer) % CircleTime);
|