AudioSelector

This commit is contained in:
ntr committed 2022-06-13 21:47:41 +10:00
1 parent 0df6510da7
commit 0cac336db2
24 files changed
+590 -412

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
using UnityEngine;
[RequireComponent(typeof(Light))]
public class ThemeLightBinder : MonoBehaviour
{
public Preferences preferences;
public float themeTime = 0.25f;
private Light _light;
private void Start() {
_light = gameObject.GetComponent<Light>();
if (preferences == null) {
Debug.Log("Light Binder needs Preferences.");
gameObject.SetActive(false);
}
}
private void Update() {
_light.color = preferences.Theme().Evaluate(themeTime);
}
public string ToString() {
return "Theme Light Binder";
}
}