// COMPARE RESOURCES -------------------------------------------

        void DisplayBody(CGME.ActionConditionCompareResource action)
        {
            CGM.GameManager lib = GameObject.FindObjectOfType <CGM.GameManager>();

            EditorGUI.indentLevel++;
            {
                EditorGUILayout.BeginHorizontal();
                {
                    action.Target          = (CGME.ResourceSource)Display.EnumPopup(Target, "Target", action.Target);
                    action.Target_Resource = Display.Popup(Target, "Resource Type", action.Target_Resource, lib.CGME_Lib.ResourceTypes());
                }
                EditorGUILayout.EndHorizontal();

                action.Operation = (CGME.CompareOperation)Display.EnumPopup(Target, "Operation", action.Operation);


                EditorGUILayout.BeginHorizontal();
                {
                    action.Param1 = (CGME.ResourceSource)Display.EnumPopup(Target, "Resource 1", action.Param1);
                    if (action.Param1 == CGME.ResourceSource.FixedValue)
                    {
                        CGME.Resource test = lib.CGME_Lib.GetResource(action.Target_Resource);
                        if (test is CGME.ResourceBool)
                        {
                            action.BoolMod = Display.Toggle(Target, "Boolean", action.BoolMod);
                        }
                        else if (test is CGME.ResourceNumber)
                        {
                            action.NumberMod = Display.IntField(Target, "Number", action.NumberMod);
                        }
                        else if (test is CGME.ResourceText)
                        {
                            action.TextMod = Display.TextField(Target, "Text", action.TextMod);
                        }
                    }
                    else
                    {
                        action.Operation_Resource = Display.Popup(Target, "Resource Type", action.Operation_Resource, lib.CGME_Lib.ResourceTypes());
                    }
                }
                EditorGUILayout.EndHorizontal();
            }
            EditorGUI.indentLevel--;
        }
        public override void DrawAsInspector()
        {
            base.DrawAsInspector();

            CGME.ActionConditionCompareResource act = (action as CGME.ActionConditionCompareResource);
            CGM.GameManager lib = GameObject.FindObjectOfType <CGM.GameManager>();

            EditorGUILayout.BeginHorizontal();
            {
                act.Target          = (CGME.ResourceSource)Display.EnumPopup(this, "Target", act.Target);
                act.Target_Resource = Display.Popup(this, "Resource Type", act.Target_Resource, lib.CGME_Lib.ResourceTypes());
            }
            EditorGUILayout.EndHorizontal();

            act.Operation = (CGME.CompareOperation)Display.EnumPopup(this, "Operation", act.Operation);


            EditorGUILayout.BeginHorizontal();
            {
                act.Param1 = (CGME.ResourceSource)Display.EnumPopup(this, "Resource 1", act.Param1);
                if (act.Param1 == CGME.ResourceSource.FixedValue)
                {
                    CGME.Resource test = lib.CGME_Lib.GetResource(act.Target_Resource);
                    if (test is CGME.ResourceBool)
                    {
                        act.BoolMod = Display.Toggle(this, "Boolean", act.BoolMod);
                    }
                    else if (test is CGME.ResourceNumber)
                    {
                        act.NumberMod = Display.IntField(this, "Number", act.NumberMod);
                    }
                    else if (test is CGME.ResourceText)
                    {
                        act.TextMod = Display.TextField(this, "Text", act.TextMod);
                    }
                }
                else
                {
                    act.Operation_Resource = Display.Popup(this, "Resource Type", act.Operation_Resource, lib.CGME_Lib.ResourceTypes());
                }
            }
            EditorGUILayout.EndHorizontal();
        }