优化ui,谱面替换,以及科研模糊

This commit is contained in:
FloatGaming
2026-02-25 03:44:41 +08:00
parent 332307d18c
commit 0b75e93f71
114 changed files with 160279 additions and 290 deletions
+5
View File
@@ -303,6 +303,7 @@ public class EffectSystem : MonoBehaviour
if (duration <= 0f)
{
ally.SetMaxHP(ally.maxHP + delta, false);
if (delta > 0) ally.SetCurrentHP(ally.currentHP + delta, false);
iBudeffPrefabController.Instance?.RegisterTimedEffect(ally, PlayerBudeffIconType.ot_maxHP_up, delta, 0f);
}
else
@@ -317,6 +318,8 @@ public class EffectSystem : MonoBehaviour
if (duration <= 0f)
{
enemy.SetMaxHP(enemy.maxHP + delta, false);
if (delta > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + delta, 0, enemy.maxHP);
iBudeffPrefabController.Instance?.RefreshEnemyNow(enemy);
iBudeffPrefabController.Instance?.RegisterEnemyTimedEffect(enemy, PlayerBudeffIconType.ot_maxHP_up, delta, 0f);
}
else
@@ -1486,6 +1489,7 @@ public class EffectSystem : MonoBehaviour
{
if (ally == null) yield break;
ally.SetMaxHP(Mathf.Max(1, ally.maxHP + delta), false);
if (delta > 0) ally.SetCurrentHP(ally.currentHP + delta, false);
yield return new WaitForSeconds(duration);
if (ally == null) yield break;
ally.SetMaxHP(Mathf.Max(1, ally.maxHP - delta), false);
@@ -1503,6 +1507,7 @@ public class EffectSystem : MonoBehaviour
{
if (enemy == null) yield break;
enemy.SetMaxHP(Mathf.Max(1, enemy.maxHP + delta), false);
if (delta > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + delta, 0, enemy.maxHP);
iBudeffPrefabController.Instance?.RefreshEnemyNow(enemy);
yield return new WaitForSeconds(duration);
if (enemy == null) yield break;
+13 -3
View File
@@ -1,4 +1,4 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -909,8 +909,16 @@ public class SkillBuilder : MonoBehaviour
int hpDelta = Mathf.CeilToInt(Mathf.Abs(amount));
if (effectType == EffectType.DecreaseMaxHP) hpDelta = -hpDelta;
int oldHP = ally != null ? ally.maxHP : enemy.maxHP;
if (ally != null) ally.SetMaxHP(Mathf.Max(1, ally.maxHP + hpDelta), false);
else enemy.SetMaxHP(Mathf.Max(1, enemy.maxHP + hpDelta), false);
if (ally != null)
{
ally.SetMaxHP(Mathf.Max(1, ally.maxHP + hpDelta), false);
if (hpDelta > 0) ally.SetCurrentHP(ally.currentHP + hpDelta, false);
}
else
{
enemy.SetMaxHP(Mathf.Max(1, enemy.maxHP + hpDelta), false);
if (hpDelta > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + hpDelta, 0, enemy.maxHP);
}
int newHP = ally != null ? ally.maxHP : enemy.maxHP;
CheckLimitAndWarnInt(targetName, "最大生命值", oldHP, newHP, hpDelta);
state = new RefreshOnlyTimedState { effectType = effectType, intDelta = hpDelta };
@@ -1485,12 +1493,14 @@ ResolvedGroup:
{
int d = Mathf.CeilToInt(amountTotal);
ally.SetMaxHP(ally.maxHP + d, false);
if (d > 0) ally.SetCurrentHP(ally.currentHP + d, false);
iBudeffPrefabController.Instance?.RegisterTimedEffect(ally, PlayerBudeffIconType.ot_maxHP_up, d, 0f);
}
else if (t.TryGetComponent<EnemyCombatant>(out var enemy))
{
int d = Mathf.CeilToInt(amountTotal);
enemy.SetMaxHP(enemy.maxHP + d, false);
if (d > 0) enemy.currentHP = Mathf.Clamp(enemy.currentHP + d, 0, enemy.maxHP);
iBudeffPrefabController.Instance?.RegisterEnemyTimedEffect(enemy, PlayerBudeffIconType.ot_maxHP_up, d, 0f);
}
break;