2.5d test
This commit is contained in:
@@ -71,6 +71,7 @@ namespace BumpCombat.UI
|
||||
private Image[] artifactSlotImages = System.Array.Empty<Image>();
|
||||
private Image[] artifactSlotIcons = System.Array.Empty<Image>();
|
||||
private readonly Stack<Text> damagePopupPool = new();
|
||||
public int ActiveDamagePopupCount => activeDamagePopupCount;
|
||||
private readonly HashSet<Text> activeDamagePopups = new();
|
||||
private int activeDamagePopupCount;
|
||||
private int damagePopupLifecycleVersion;
|
||||
@@ -916,6 +917,22 @@ namespace BumpCombat.UI
|
||||
playerHealth.transform.position + Vector3.up * 0.75f);
|
||||
}
|
||||
|
||||
public void ShowTowerDamagePopup(
|
||||
float actualDamage,
|
||||
Color color,
|
||||
Vector3 worldPosition)
|
||||
{
|
||||
if (actualDamage <= 0f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TryShowDamagePopup(
|
||||
$"-{DamageCalculator.FormatDamage(actualDamage)}",
|
||||
color,
|
||||
worldPosition);
|
||||
}
|
||||
|
||||
private bool TryShowDamagePopup(
|
||||
string text,
|
||||
Color color,
|
||||
|
||||
@@ -541,6 +541,15 @@ namespace BumpCombat.UI
|
||||
|
||||
private void BeginRun(RunMode mode)
|
||||
{
|
||||
if (mode == RunMode.DefensePrototype)
|
||||
{
|
||||
BumpCombat.Defense.DefensePrototypeController.PrepareTowerHitTestRun();
|
||||
}
|
||||
else
|
||||
{
|
||||
BumpCombat.Defense.DefensePrototypeController.CancelTowerHitTestRun();
|
||||
}
|
||||
|
||||
if (runManager == null || !runManager.BeginRun(mode))
|
||||
{
|
||||
return;
|
||||
@@ -580,6 +589,7 @@ namespace BumpCombat.UI
|
||||
|
||||
private void ReturnToTitle()
|
||||
{
|
||||
BumpCombat.Defense.DefensePrototypeController.CancelTowerHitTestRun();
|
||||
audioService?.PlayUi("ui_confirm");
|
||||
runManager?.RestartToTitle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user