Initial commit

This commit is contained in:
Lncvrt committed 2026-03-12 18:07:56 -07:00
commit 0b242cdfb6
1111 files changed
+2834

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
using UnityEngine;
using UnityEngine.UI;
public class RainbowImage : MonoBehaviour
{
public float frequency = 1f;
private Image targetImage;
void Awake()
{
targetImage = gameObject.GetComponent<Image>();
}
void Update()
{
float t = Time.time * frequency;
float r = Mathf.Sin(t) * 0.5f + 0.5f;
float g = Mathf.Sin(t + 2f) * 0.5f + 0.5f;
float b = Mathf.Sin(t + 4f) * 0.5f + 0.5f;
targetImage.color = new Color(r, g, b);
}
}