|
@@ -10,6 +10,8 @@ namespace KairoEngine.UI.Encyclopedia
|
|
[HideMonoScript]
|
|
[HideMonoScript]
|
|
public class EncyclopediaController : MonoBehaviour, IClickHandler
|
|
public class EncyclopediaController : MonoBehaviour, IClickHandler
|
|
{
|
|
{
|
|
|
|
+ public static EncyclopediaController instance;
|
|
|
|
+
|
|
[ShowInInspector, HorizontalGroup("IndexLine", 0.7f), LabelText("Index")] public int menuIndex;
|
|
[ShowInInspector, HorizontalGroup("IndexLine", 0.7f), LabelText("Index")] public int menuIndex;
|
|
[ShowInInspector, HorizontalGroup("IndexLine", 0.3f), HideLabel] public int subMenuIndex;
|
|
[ShowInInspector, HorizontalGroup("IndexLine", 0.3f), HideLabel] public int subMenuIndex;
|
|
|
|
|
|
@@ -17,6 +19,12 @@ namespace KairoEngine.UI.Encyclopedia
|
|
public GameObject categoryButtomPrefab;
|
|
public GameObject categoryButtomPrefab;
|
|
public List<EncyclopediaCategory> categories = new List<EncyclopediaCategory>();
|
|
public List<EncyclopediaCategory> categories = new List<EncyclopediaCategory>();
|
|
|
|
|
|
|
|
+ private void Awake()
|
|
|
|
+ {
|
|
|
|
+ if(instance == null) instance = this;
|
|
|
|
+ else Destroy(this);
|
|
|
|
+ }
|
|
|
|
+
|
|
[Button("Build Menu"), ButtonGroup("Buttons")]
|
|
[Button("Build Menu"), ButtonGroup("Buttons")]
|
|
public void BuildMenu()
|
|
public void BuildMenu()
|
|
{
|
|
{
|