Example #1
0
 public void ResetData()
 {
     PlayerData.instance.SetDefault();
     indicators.Apply();
     levelBar.Apply();
     states.CheckStatesAgain();
 }
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        ItemStateController controller = (ItemStateController)target;

        EditorGUILayout.BeginHorizontal();
        if (GUILayout.Button("Lock Item"))
        {
            controller.SetMapItemState(ItemState.Locked);
        }
        if (GUILayout.Button("UnlockItem"))
        {
            controller.SetMapItemState(ItemState.Unlocked);
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        if (GUILayout.Button("Control Items"))
        {
            controller.CheckStatesAgain();
        }
        EditorGUILayout.EndHorizontal();
    }