|
|
@@ -187,21 +187,25 @@ namespace Fort23.Mono
|
|
|
UIManager.Instance.HideUIUIPanel(this);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
int redDotID = 5;
|
|
|
+ private int currentMiao = 0;
|
|
|
+ private float allexp = 0;
|
|
|
+
|
|
|
public async CTask CustomInit()
|
|
|
{
|
|
|
ClosePool();
|
|
|
|
|
|
- int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) /
|
|
|
- 1000);
|
|
|
+ currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) /
|
|
|
+ 1000);
|
|
|
|
|
|
- float allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
+ allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
|
|
|
Slider_Exp.maxValue = PlayerManager.Instance.myHero.powerUpConfig.levelUpExp;
|
|
|
Slider_Exp.value = PlayerManager.Instance.myHero.heroData.exp + allexp;
|
|
|
|
|
|
Text_exp.text =
|
|
|
- $"{(int)PlayerManager.Instance.myHero.exp.Value + allexp}/{PlayerManager.Instance.myHero.powerUpConfig.levelUpExp}";
|
|
|
+ $"{(int)PlayerManager.Instance.myHero.heroData.exp + allexp}/{PlayerManager.Instance.myHero.powerUpConfig.levelUpExp}";
|
|
|
|
|
|
for (var i = 0; i < JingJieIcons.Count; i++)
|
|
|
{
|
|
|
@@ -273,7 +277,6 @@ namespace Fort23.Mono
|
|
|
PlayerManager.Instance.myHero.heroData.heroPowerId + 1);
|
|
|
|
|
|
|
|
|
-
|
|
|
AccountFileInfo.RedDot redDot = RedDotManager.Instance.GetRedDot(redDotID);
|
|
|
if (redDot == null)
|
|
|
{
|
|
|
@@ -422,22 +425,22 @@ namespace Fort23.Mono
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- float timer = 0;
|
|
|
+ // float timer = 0;
|
|
|
|
|
|
[CustomMethod(CustomMethodType.Update)]
|
|
|
public void Update()
|
|
|
{
|
|
|
- timer += Time.deltaTime;
|
|
|
- if (timer < 1f)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- timer = 0;
|
|
|
- int currentMiao =
|
|
|
+ // timer += Time.deltaTime;
|
|
|
+ // if (timer < 1f)
|
|
|
+ // {
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // timer = 0;
|
|
|
+ currentMiao =
|
|
|
(int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
|
|
|
|
|
|
- float allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
+ allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
|
|
|
Slider_Exp.value = PlayerManager.Instance.myHero.heroData.exp + allexp;
|
|
|
|
|
|
@@ -550,7 +553,8 @@ namespace Fort23.Mono
|
|
|
public async override CTask Close()
|
|
|
{
|
|
|
fx_ui_tupo_loop.gameObject.SetActive(false);
|
|
|
- timer = 0;
|
|
|
+ currentMiao = 0;
|
|
|
+ allexp = 0;
|
|
|
ClosePool();
|
|
|
await base.Close();
|
|
|
}
|