ui基本完毕,修了一大把的bug
This commit is contained in:
@@ -1078,22 +1078,6 @@ public class EffectSystem : MonoBehaviour
|
||||
{
|
||||
// Use deferPopup: true for synchronization with hit fx
|
||||
comp.ReceiveDamage(amount, source, true);
|
||||
|
||||
// Record stats if source is an ally
|
||||
if (source != null && target.GetComponent<EnemyCombatant>() != null)
|
||||
{
|
||||
var ally = source.GetComponent<AllyCombatant>();
|
||||
if (ally != null && teamUIController.Instance != null)
|
||||
{
|
||||
teamUIController.Instance.RecordDamage(ally.slotIndex, amount);
|
||||
}
|
||||
}
|
||||
|
||||
// Record damage taken if target is an ally
|
||||
if (targetAlly != null && teamUIController.Instance != null)
|
||||
{
|
||||
teamUIController.Instance.RecordDamageTaken(targetAlly.slotIndex, amount);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1109,16 +1093,6 @@ public class EffectSystem : MonoBehaviour
|
||||
{
|
||||
// Use deferPopup: false for heals (usually immediate)
|
||||
comp.ReceiveHeal(amount, source, false);
|
||||
|
||||
// Record stats if source is an ally
|
||||
if (source != null)
|
||||
{
|
||||
var ally = source.GetComponent<AllyCombatant>();
|
||||
if (ally != null && teamUIController.Instance != null)
|
||||
{
|
||||
teamUIController.Instance.RecordHeal(ally.slotIndex, amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1175,13 +1149,6 @@ public class EffectSystem : MonoBehaviour
|
||||
|
||||
comp.ReceiveDamage(totalAmount, source, false);
|
||||
// No need to call TriggerQueuedPopups manually as deferPopup is false
|
||||
|
||||
if (source != null && targetEnemy != null)
|
||||
{
|
||||
var ally = source.GetComponent<AllyCombatant>();
|
||||
if (ally != null && teamUIController.Instance != null) teamUIController.Instance.RecordDamage(ally.slotIndex, totalAmount);
|
||||
}
|
||||
if (targetAlly != null && teamUIController.Instance != null) teamUIController.Instance.RecordDamageTaken(targetAlly.slotIndex, totalAmount);
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -1224,13 +1191,6 @@ public class EffectSystem : MonoBehaviour
|
||||
|
||||
comp.ReceiveDamage(perTick, source, false);
|
||||
// No need to call TriggerQueuedPopups manually as deferPopup is false
|
||||
|
||||
if (source != null && targetEnemy != null)
|
||||
{
|
||||
var ally = source.GetComponent<AllyCombatant>();
|
||||
if (ally != null && teamUIController.Instance != null) teamUIController.Instance.RecordDamage(ally.slotIndex, perTick);
|
||||
}
|
||||
if (targetAlly != null && teamUIController.Instance != null) teamUIController.Instance.RecordDamageTaken(targetAlly.slotIndex, perTick);
|
||||
yield return new WaitForSeconds(tickInterval);
|
||||
elapsed += tickInterval;
|
||||
}
|
||||
@@ -1265,13 +1225,6 @@ public class EffectSystem : MonoBehaviour
|
||||
|
||||
comp.ReceiveHeal(totalAmount, source, false);
|
||||
// No need to call TriggerQueuedPopups manually as deferPopup is false
|
||||
|
||||
// Record stats
|
||||
if (source != null)
|
||||
{
|
||||
var ally = source.GetComponent<AllyCombatant>();
|
||||
if (ally != null && teamUIController.Instance != null) teamUIController.Instance.RecordHeal(ally.slotIndex, totalAmount);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -1286,13 +1239,6 @@ public class EffectSystem : MonoBehaviour
|
||||
|
||||
comp.ReceiveHeal(perTick, source, false);
|
||||
// No need to call TriggerQueuedPopups manually as deferPopup is false
|
||||
|
||||
// Record stats
|
||||
if (source != null)
|
||||
{
|
||||
var ally = source.GetComponent<AllyCombatant>();
|
||||
if (ally != null && teamUIController.Instance != null) teamUIController.Instance.RecordHeal(ally.slotIndex, perTick);
|
||||
}
|
||||
yield return new WaitForSeconds(tickInterval);
|
||||
elapsed += tickInterval;
|
||||
}
|
||||
@@ -1345,12 +1291,6 @@ public class EffectSystem : MonoBehaviour
|
||||
if (ally != null)
|
||||
{
|
||||
ally.ModifyMana(Mathf.CeilToInt(totalAmount), true, true);
|
||||
// Record stats
|
||||
if (totalAmount > 0f && source != null)
|
||||
{
|
||||
var sourceAlly = source.GetComponent<AllyCombatant>();
|
||||
if (sourceAlly != null && teamUIController.Instance != null) teamUIController.Instance.RecordMana(sourceAlly.slotIndex, totalAmount);
|
||||
}
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
@@ -1364,12 +1304,6 @@ public class EffectSystem : MonoBehaviour
|
||||
if (ally != null)
|
||||
{
|
||||
ally.ModifyMana(Mathf.CeilToInt(perTick), true, true);
|
||||
// Record stats
|
||||
if (perTick > 0f && source != null)
|
||||
{
|
||||
var sourceAlly = source.GetComponent<AllyCombatant>();
|
||||
if (sourceAlly != null && teamUIController.Instance != null) teamUIController.Instance.RecordMana(sourceAlly.slotIndex, perTick);
|
||||
}
|
||||
}
|
||||
yield return new WaitForSeconds(tickInterval);
|
||||
elapsed += tickInterval;
|
||||
|
||||
Reference in New Issue
Block a user