Insanely huge initial commit

This commit is contained in:
2026-02-21 16:40:15 -08:00
parent 208d626100
commit f74c547a13
33825 changed files with 5213498 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
using UnityEngine;
namespace Febucci.UI.Examples
{
//Prevents this example to show up in the inspector
[AddComponentMenu("")]
public class EventExample : MonoBehaviour
{
public TextAnimatorPlayer textAnimatorPlayer;
public Camera cam;
int lastBGIndex;
public Color[] bgColors;
private void Awake()
{
UnityEngine.Assertions.Assert.IsNotNull(textAnimatorPlayer, $"Text Animator Player component is null in {gameObject.name}");
textAnimatorPlayer.textAnimator.onEvent += OnEvent;
}
void OnEvent(string message)
{
switch (message)
{
case "bg":
cam.backgroundColor = bgColors[lastBGIndex];
lastBGIndex++;
if (lastBGIndex >= bgColors.Length)
{
lastBGIndex = 0;
}
break;
}
}
}
}