|
@@ -92,7 +92,7 @@ namespace Fort23.Mono
|
|
|
});
|
|
|
|
|
|
|
|
|
- Btn_TuPo.onClick.AddListener(async() =>
|
|
|
+ Btn_TuPo.onClick.AddListener(async () =>
|
|
|
{
|
|
|
if (PlayerManager.Instance.myHero.powerUpConfig.jingjie1 == heroInfo.powerUpConfig.jingjie1)
|
|
|
{
|
|
@@ -153,6 +153,64 @@ namespace Fort23.Mono
|
|
|
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("生命",
|
|
@@ -160,13 +218,15 @@ namespace Fort23.Mono
|
|
|
"+" + (heroInfo.hp.Value - PlayerManager.Instance.myHero.hp.Value).ToString()));
|
|
|
HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
|
|
|
- heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
heroAttributeWidget.CustomInit(new HeroAttributeData("攻击",
|
|
|
PlayerManager.Instance.myHero.attack.Value.ToString(),
|
|
|
"+" + (heroInfo.attack.Value - PlayerManager.Instance.myHero.attack.Value).ToString()));
|
|
|
HeroAttributeWidgets.Add(heroAttributeWidget);
|
|
|
|
|
|
- heroAttributeWidget = await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
+ heroAttributeWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<HeroAttributeWidget>(null, AttributeRoot);
|
|
|
heroAttributeWidget.CustomInit(new HeroAttributeData("防御",
|
|
|
PlayerManager.Instance.myHero.defense.Value.ToString(),
|
|
|
"+" + (heroInfo.defense.Value - PlayerManager.Instance.myHero.defense.Value).ToString()));
|
|
@@ -201,9 +261,7 @@ namespace Fort23.Mono
|
|
|
}
|
|
|
|
|
|
Text_Level.text = $"LV{PlayerManager.Instance.myHero.level}";
|
|
|
- int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
|
|
|
|
|
|
- float allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
|
|
|
int miao = (int)((PlayerManager.Instance.myHero.powerUpConfig.levelUpExp -
|
|
|
(PlayerManager.Instance.myHero.heroData.exp + allexp)) /
|
|
@@ -236,7 +294,8 @@ namespace Fort23.Mono
|
|
|
[CustomMethod(CustomMethodType.Update)]
|
|
|
public void Update()
|
|
|
{
|
|
|
- int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
|
|
|
+ int currentMiao =
|
|
|
+ (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
|
|
|
|
|
|
float allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
|
|
@@ -381,7 +440,7 @@ namespace Fort23.Mono
|
|
|
AudioManager.Instance.PlayAudio("dujie_pizhong.wav");
|
|
|
await TimerComponent.Instance.WaitAsync(200);
|
|
|
showTextWidgets[i].ShowUI(hpPos.transform.position, -h, HarmType.Default, false);
|
|
|
-
|
|
|
+
|
|
|
hp -= h;
|
|
|
hp = hp < 0 ? 0 : hp;
|
|
|
Slider_Hp.value = hp;
|