window mode and botany wip
This commit is contained in:
1 parent
f0aa6495c7
commit
0f9576a67b
68 files changed
+8224
-1311
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user