AudioSelector
This commit is contained in:
1 parent
0df6510da7
commit
0cac336db2
24 files changed
+590
-412
No files matched your search
@@ -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";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user