온라인 구현
This commit is contained in:
18
Assets/Scripts/TextColorManager.cs
Normal file
18
Assets/Scripts/TextColorManager.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class TextColorManager : MonoBehaviour
|
||||
{
|
||||
private TextMeshProUGUI _text;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
_text = GetComponent<TextMeshProUGUI>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
_text.color = Color.HSVToRGB(Mathf.PingPong(Time.time, 1f), 1f, 1f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user