hch
2025-10-30 dc7922d80c1d133b6261b8af1d521567d2c0a35d
Main/System/Battle/UIComp/DamageLine.cs
@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DamageLine : MonoBehaviour
{
@@ -26,4 +27,25 @@
        damageTypeLabel.SetActive(false);
        damageValueLabel.text = BattleUtility.DisplayDamageNum(damage);
    }
    public void SetColor(Color color)
    {
        var text = GetComponent<Text>();
        if (text != null)
        {
            text.color = color;
        }
        var texts = GetComponentsInChildren<Text>();
        foreach (var t in texts)
        {
            t.color = color;
        }
        var images = GetComponentsInChildren<Image>();
        foreach (var img in images)
        {
            img.color = color;
        }
    }
}