|
|
@@ -21,6 +21,7 @@ namespace Fort23.Mono
|
|
|
[UIBinding(prefab = "HeroInformationPanel")]
|
|
|
public partial class HeroInformationPanel : UIPanel
|
|
|
{
|
|
|
+ private int maxLevel = 300;
|
|
|
private GameObjectPool modelObj;
|
|
|
|
|
|
List<HeroAttributeWidget> HeroAttributeWidgets = new List<HeroAttributeWidget>();
|
|
|
@@ -155,9 +156,6 @@ namespace Fort23.Mono
|
|
|
HeroBreakthroughSuccessPanel heroBreakthroughSuccessPanel =
|
|
|
await HeroBreakthroughSuccessPanel.OpenPanel(1, heroAttributData);
|
|
|
await heroBreakthroughSuccessPanel.UIClosed();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
//大突破
|
|
|
else
|
|
|
@@ -188,118 +186,13 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
ClosePool();
|
|
|
|
|
|
- await CreatHero();
|
|
|
-
|
|
|
-
|
|
|
- heroInfo = PlayerManager.Instance.myHero.CopyHero();
|
|
|
- heroInfo.InitHero(PlayerManager.Instance.myHero.heroData.heroModelId,
|
|
|
- PlayerManager.Instance.myHero.heroData.heroPowerId + 1);
|
|
|
-
|
|
|
-
|
|
|
int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) /
|
|
|
1000);
|
|
|
|
|
|
float allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
- int redDotID = 5;
|
|
|
- AccountFileInfo.RedDot redDot = RedDotManager.Instance.GetRedDot(redDotID);
|
|
|
- if (redDot == null)
|
|
|
- {
|
|
|
- redDot = new AccountFileInfo.RedDot();
|
|
|
- redDot.id = redDotID;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1)
|
|
|
- {
|
|
|
- //大突破
|
|
|
- if (PlayerManager.Instance.myHero.powerUpConfig.jingjie2 != heroInfo.powerUpConfig.jingjie2)
|
|
|
- {
|
|
|
- for (var i = 0;
|
|
|
- i < PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs.Length;
|
|
|
- i++)
|
|
|
- {
|
|
|
- if (!PlayerManager.Instance.BagController.IsEnough(
|
|
|
- PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs[i], 1))
|
|
|
- {
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (!redDot.Params.Contains(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString()))
|
|
|
- {
|
|
|
- redDot.Params.Add(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString());
|
|
|
- RedDotManager.Instance.AddRedDot(redDot);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- for (var i = 0;
|
|
|
- i < PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs.Length;
|
|
|
- i++)
|
|
|
- {
|
|
|
- if (!PlayerManager.Instance.BagController.IsEnough(
|
|
|
- PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs[i], 1))
|
|
|
- {
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (!redDot.Params.Contains(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString()))
|
|
|
- {
|
|
|
- redDot.Params.Add(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString());
|
|
|
- RedDotManager.Instance.AddRedDot(redDot);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- HeroAttributeWidget heroAttributeWidget =
|
|
|
- await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
- heroAttributeWidget.CustomInit(new HeroAttributeData("生命",
|
|
|
- PlayerManager.Instance.myHero.hp.Value.ToStringEx(),
|
|
|
- "+" + (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToStringEx()));
|
|
|
- HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
-
|
|
|
- heroAttributeWidget =
|
|
|
- await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
- heroAttributeWidget.CustomInit(new HeroAttributeData("攻击",
|
|
|
- PlayerManager.Instance.myHero.attack.Value.ToStringEx(),
|
|
|
- "+" + (heroInfo.attack.Value - PlayerManager.Instance.myHero.attack.Value).ToStringEx()));
|
|
|
- HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
-
|
|
|
- heroAttributeWidget =
|
|
|
- await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
- heroAttributeWidget.CustomInit(new HeroAttributeData("防御",
|
|
|
- PlayerManager.Instance.myHero.defense.Value.ToStringEx(),
|
|
|
- "+" + (heroInfo.defense.Value - PlayerManager.Instance.myHero.defense.Value).ToStringEx()));
|
|
|
- HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
-
|
|
|
+ // await CreatHero();
|
|
|
Slider_Exp.maxValue = PlayerManager.Instance.myHero.powerUpConfig.levelUpExp;
|
|
|
Slider_Exp.value = PlayerManager.Instance.myHero.heroData.exp;
|
|
|
- //
|
|
|
- // heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
- // heroAttributeWidget.CustomInit("生命", PlayerManager.Instance.myHero.hp.Value.ToString(), (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToString());
|
|
|
- // HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
- if (PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
- {
|
|
|
- Text_Jingjie1.text =
|
|
|
- LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
|
|
|
- LanguageManager.Instance.Text(10429) + LanguageManager.Instance.Text(10381);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- Text_Jingjie1.text =
|
|
|
- LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
|
|
|
- LanguageManager.Instance.Text(10429);
|
|
|
- }
|
|
|
-
|
|
|
- string jingjie =
|
|
|
- LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
|
|
|
- LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[1]) +
|
|
|
- LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[2]);
|
|
|
- Text_Jingjie.text = LanguageManager.Instance.Text(10225, jingjie,
|
|
|
- PlayerManager.Instance.myHero.powerUpConfig.jingjie3, 10);
|
|
|
-
|
|
|
|
|
|
for (var i = 0; i < JingJieIcons.Count; i++)
|
|
|
{
|
|
|
@@ -331,72 +224,202 @@ namespace Fort23.Mono
|
|
|
PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- //可以突破特效设置
|
|
|
- fx_ui_tupo_loop.gameObject.SetActive(false);
|
|
|
- fx_ui_pojing_loop.gameObject.SetActive(false);
|
|
|
- fx_ui_pojing_loop2.gameObject.SetActive(false);
|
|
|
- fx_ui_dujie_loop.gameObject.SetActive(false);
|
|
|
- if (PlayerManager.Instance.myHero.heroData.exp + allexp >=
|
|
|
- PlayerManager.Instance.myHero.powerUpConfig.levelUpExp)
|
|
|
+ if (PlayerManager.Instance.myHero.heroData.heroPowerId >= maxLevel)
|
|
|
+ {
|
|
|
+ Btn_TuPo.gameObject.SetActive(false);
|
|
|
+
|
|
|
+ HeroAttributeWidget heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget.CustomInit(new HeroAttributeData("生命",
|
|
|
+ PlayerManager.Instance.myHero.hp.Value.ToStringEx(), "Max"));
|
|
|
+ HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
+
|
|
|
+ heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget.CustomInit(new HeroAttributeData("攻击",
|
|
|
+ PlayerManager.Instance.myHero.attack.Value.ToStringEx(), "Max"));
|
|
|
+ HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
+
|
|
|
+ heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget.CustomInit(new HeroAttributeData("防御",
|
|
|
+ PlayerManager.Instance.myHero.defense.Value.ToStringEx(), "Max"));
|
|
|
+ HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
+ Btn_TuPo.gameObject.SetActive(true);
|
|
|
+ heroInfo = PlayerManager.Instance.myHero.CopyHero();
|
|
|
+ heroInfo.InitHero(PlayerManager.Instance.myHero.heroData.heroModelId,
|
|
|
+ PlayerManager.Instance.myHero.heroData.heroPowerId + 1);
|
|
|
+
|
|
|
+
|
|
|
+ int redDotID = 5;
|
|
|
+ AccountFileInfo.RedDot redDot = RedDotManager.Instance.GetRedDot(redDotID);
|
|
|
+ if (redDot == null)
|
|
|
+ {
|
|
|
+ redDot = new AccountFileInfo.RedDot();
|
|
|
+ redDot.id = redDotID;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1)
|
|
|
{
|
|
|
- //小突破
|
|
|
- if (PlayerManager.Instance.myHero.powerUpConfig.jingjie2 == heroInfo.powerUpConfig.jingjie2)
|
|
|
+ //大突破
|
|
|
+ if (PlayerManager.Instance.myHero.powerUpConfig.jingjie2 != heroInfo.powerUpConfig.jingjie2)
|
|
|
{
|
|
|
- fx_ui_tupo_loop.gameObject.SetActive(true);
|
|
|
- fx_ui_tupo_loop.Play();
|
|
|
+ for (var i = 0;
|
|
|
+ i < PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs.Length;
|
|
|
+ i++)
|
|
|
+ {
|
|
|
+ if (!PlayerManager.Instance.BagController.IsEnough(
|
|
|
+ PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs[i], 1))
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!redDot.Params.Contains(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString()))
|
|
|
+ {
|
|
|
+ redDot.Params.Add(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString());
|
|
|
+ RedDotManager.Instance.AddRedDot(redDot);
|
|
|
+ }
|
|
|
}
|
|
|
- //破镜
|
|
|
- else
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ for (var i = 0;
|
|
|
+ i < PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs.Length;
|
|
|
+ i++)
|
|
|
+ {
|
|
|
+ if (!PlayerManager.Instance.BagController.IsEnough(
|
|
|
+ PlayerManager.Instance.myHero.powerUpConfig.DujieMustItemIDs[i], 1))
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!redDot.Params.Contains(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString()))
|
|
|
{
|
|
|
- fx_ui_pojing_loop.Play();
|
|
|
- fx_ui_pojing_loop.gameObject.SetActive(true);
|
|
|
+ redDot.Params.Add(PlayerManager.Instance.myHero.powerUpConfig.ID.ToString());
|
|
|
+ RedDotManager.Instance.AddRedDot(redDot);
|
|
|
}
|
|
|
}
|
|
|
- //圆满
|
|
|
- else if (!PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
+
|
|
|
+
|
|
|
+ HeroAttributeWidget heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget.CustomInit(new HeroAttributeData("生命",
|
|
|
+ PlayerManager.Instance.myHero.hp.Value.ToStringEx(),
|
|
|
+ "+" + (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToStringEx()));
|
|
|
+ HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
+
|
|
|
+ heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget.CustomInit(new HeroAttributeData("攻击",
|
|
|
+ PlayerManager.Instance.myHero.attack.Value.ToStringEx(),
|
|
|
+ "+" + (heroInfo.attack.Value - PlayerManager.Instance.myHero.attack.Value).ToStringEx()));
|
|
|
+ HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
+
|
|
|
+ heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget.CustomInit(new HeroAttributeData("防御",
|
|
|
+ PlayerManager.Instance.myHero.defense.Value.ToStringEx(),
|
|
|
+ "+" + (heroInfo.defense.Value - PlayerManager.Instance.myHero.defense.Value).ToStringEx()));
|
|
|
+ HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
+
|
|
|
+
|
|
|
+ //
|
|
|
+ // heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ // heroAttributeWidget.CustomInit("生命", PlayerManager.Instance.myHero.hp.Value.ToString(), (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToString());
|
|
|
+ // HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
+ if (PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
{
|
|
|
- fx_ui_pojing_loop2.gameObject.SetActive(true);
|
|
|
- fx_ui_pojing_loop2.Play();
|
|
|
+ Text_Jingjie1.text =
|
|
|
+ LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
|
|
|
+ LanguageManager.Instance.Text(10429) + LanguageManager.Instance.Text(10381);
|
|
|
}
|
|
|
- else if (PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
+ else
|
|
|
{
|
|
|
- fx_ui_dujie_loop.gameObject.SetActive(true);
|
|
|
- fx_ui_dujie_loop.Play();
|
|
|
+ Text_Jingjie1.text =
|
|
|
+ LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
|
|
|
+ LanguageManager.Instance.Text(10429);
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
+ string jingjie =
|
|
|
+ LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[0]) +
|
|
|
+ LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[1]) +
|
|
|
+ LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[2]);
|
|
|
+ Text_Jingjie.text = LanguageManager.Instance.Text(10225, jingjie,
|
|
|
+ PlayerManager.Instance.myHero.powerUpConfig.jingjie3, 10);
|
|
|
|
|
|
- Text_exp.text =
|
|
|
- $"{(int)PlayerManager.Instance.myHero.exp.Value + allexp}/{PlayerManager.Instance.myHero.powerUpConfig.levelUpExp}";
|
|
|
|
|
|
- //突破按钮图片和文字设置
|
|
|
- if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1 &&
|
|
|
- PlayerManager.Instance.myHero.powerUpConfig.jingjie2 == heroInfo.powerUpConfig.jingjie2)
|
|
|
- {
|
|
|
- Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianTupo";
|
|
|
- Text_TuPo.text = LanguageManager.Instance.Text(10228);
|
|
|
- }
|
|
|
- else if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1 &&
|
|
|
- PlayerManager.Instance.myHero.powerUpConfig.jingjie2 != heroInfo.powerUpConfig.jingjie2)
|
|
|
- {
|
|
|
- Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianTupo";
|
|
|
- Text_TuPo.text = "破镜";
|
|
|
- }
|
|
|
+ //可以突破特效设置
|
|
|
+ fx_ui_tupo_loop.gameObject.SetActive(false);
|
|
|
+ fx_ui_pojing_loop.gameObject.SetActive(false);
|
|
|
+ fx_ui_pojing_loop2.gameObject.SetActive(false);
|
|
|
+ fx_ui_dujie_loop.gameObject.SetActive(false);
|
|
|
+ if (PlayerManager.Instance.myHero.heroData.exp + allexp >=
|
|
|
+ PlayerManager.Instance.myHero.powerUpConfig.levelUpExp)
|
|
|
+ {
|
|
|
+ if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1)
|
|
|
+ {
|
|
|
+ //小突破
|
|
|
+ if (PlayerManager.Instance.myHero.powerUpConfig.jingjie2 == heroInfo.powerUpConfig.jingjie2)
|
|
|
+ {
|
|
|
+ fx_ui_tupo_loop.gameObject.SetActive(true);
|
|
|
+ fx_ui_tupo_loop.Play();
|
|
|
+ }
|
|
|
+ //破镜
|
|
|
+ else
|
|
|
+ {
|
|
|
+ fx_ui_pojing_loop.Play();
|
|
|
+ fx_ui_pojing_loop.gameObject.SetActive(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //圆满
|
|
|
+ else if (!PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
+ {
|
|
|
+ fx_ui_pojing_loop2.gameObject.SetActive(true);
|
|
|
+ fx_ui_pojing_loop2.Play();
|
|
|
+ }
|
|
|
+ else if (PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
+ {
|
|
|
+ fx_ui_dujie_loop.gameObject.SetActive(true);
|
|
|
+ fx_ui_dujie_loop.Play();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- else
|
|
|
- {
|
|
|
- if (PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
+
|
|
|
+ Text_exp.text =
|
|
|
+ $"{(int)PlayerManager.Instance.myHero.exp.Value + allexp}/{PlayerManager.Instance.myHero.powerUpConfig.levelUpExp}";
|
|
|
+
|
|
|
+ //突破按钮图片和文字设置
|
|
|
+ if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1 &&
|
|
|
+ PlayerManager.Instance.myHero.powerUpConfig.jingjie2 == heroInfo.powerUpConfig.jingjie2)
|
|
|
+ {
|
|
|
+ Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianTupo";
|
|
|
+ Text_TuPo.text = LanguageManager.Instance.Text(10228);
|
|
|
+ }
|
|
|
+ else if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1 &&
|
|
|
+ PlayerManager.Instance.myHero.powerUpConfig.jingjie2 != heroInfo.powerUpConfig.jingjie2)
|
|
|
{
|
|
|
- Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianDujie";
|
|
|
- Text_TuPo.text = LanguageManager.Instance.Text(10229);
|
|
|
+ Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianTupo";
|
|
|
+ Text_TuPo.text = "破镜";
|
|
|
}
|
|
|
+
|
|
|
else
|
|
|
{
|
|
|
- Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianTupo2";
|
|
|
- Text_TuPo.text = LanguageManager.Instance.Text(10228);
|
|
|
+ if (PlayerManager.Instance.myHero.heroData.isYuanMan)
|
|
|
+ {
|
|
|
+ Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianDujie";
|
|
|
+ Text_TuPo.text = LanguageManager.Instance.Text(10229);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Btn_TuPo.GetComponent<MyImage>().icon_name = "btn_xiulianTupo2";
|
|
|
+ Text_TuPo.text = LanguageManager.Instance.Text(10228);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|