From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Battle/UIComp/DamageLine.cs | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/Main/System/Battle/UIComp/DamageLine.cs b/Main/System/Battle/UIComp/DamageLine.cs
index 5d231df..ccac5bc 100644
--- a/Main/System/Battle/UIComp/DamageLine.cs
+++ b/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
{
@@ -24,6 +25,27 @@
public void SetDamage(BattleDmg damage)
{
damageTypeLabel.SetActive(false);
- damageValueLabel.text = BattleUtility.DisplayDamageNum(damage.damage, damage.attackType);
+ 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;
+ }
}
}
--
Gitblit v1.8.0