You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
550 B
C#
26 lines
550 B
C#
2 weeks ago
|
using System;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
namespace Unity.BossRoom.Gameplay.UI
|
||
|
{
|
||
|
[RequireComponent(typeof(Image))]
|
||
|
public class UITinter : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField]
|
||
|
Color[] m_TintColors;
|
||
|
Image m_Image;
|
||
|
void Awake()
|
||
|
{
|
||
|
m_Image = GetComponent<Image>();
|
||
|
}
|
||
|
|
||
|
public void SetToColor(int colorIndex)
|
||
|
{
|
||
|
if (colorIndex >= m_TintColors.Length)
|
||
|
return;
|
||
|
m_Image.color = m_TintColors[colorIndex];
|
||
|
}
|
||
|
}
|
||
|
}
|