window mode and botany wip

This commit is contained in:
ntr committed 2022-05-31 15:39:24 +10:00
1 parent f0aa6495c7
commit 0f9576a67b
68 files changed
+8224 -1311

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteAlways]
public class Preferences : MonoBehaviour {
public ThemeSelector themeSelector;
public PreferenceData data;
void Awake() {
string path = Path.Combine(Application.persistentDataPath, "preferences.json");
data = new PreferenceData(path).Load();
// Debug.Log($"ThemeIndex {data.themeIndex}");
}
public void SetThemeIndex(int i) {
data.themeIndex = i;
data.Save();
}
public Gradient Theme() {
return themeSelector.CurrentTheme();
}
}