| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | public class DamageLine : MonoBehaviour |
| | | { |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |