Inventory.characterSystem C# (CSharp) Method

characterSystem() public method

public characterSystem ( ) : bool
return bool
    public bool characterSystem()
    {
        if (GetComponent<EquipmentSystem>() != null)
            return true;
        else
            return false;
    }

Usage Example

Example #1
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();
        GUILayout.BeginVertical("Box");
        EditorGUI.BeginChangeCheck();
        EditorGUILayout.PropertyField(mainInventory, new GUIContent("Player Inventory"));
        if (EditorGUI.EndChangeCheck())
        {
            inv.setAsMain();
        }
        GUILayout.EndVertical();


        GUILayout.BeginVertical("Box");
        EditorGUI.indentLevel++;
        GUILayout.BeginVertical("Box");
        showInventorySettings = EditorGUILayout.Foldout(showInventorySettings, "Inventory Settings");
        if (showInventorySettings)
        {
            sizeOfInventoryGUI();
        }
        GUILayout.EndVertical();

        if (!inv.characterSystem())
        {
            GUILayout.BeginVertical("Box");
            showStackableItemsSettings = EditorGUILayout.Foldout(showStackableItemsSettings, "Stacking/Splitting");
            if (showStackableItemsSettings)
            {
                stackableItemsSettings();
                GUILayout.Space(20);
            }
            GUILayout.EndVertical();
        }
        EditorGUI.indentLevel--;
        GUILayout.EndVertical();


        serializedObject.ApplyModifiedProperties();
        SceneView.RepaintAll();
        GUILayout.BeginVertical("Box");
        addItemGUI();
        GUILayout.EndVertical();
    }