コード例 #1
0
    public override void OnInspectorGUI()
    {
        //if(SeeInspector.boolValue)							// If true Default Inspector is drawn on screen
        DrawDefaultInspector();

        serializedObject.Update();

        isObjectActivated myScript = (isObjectActivated)target;

        /*EditorGUILayout.BeginHorizontal ();
         * EditorGUILayout.LabelField ("See Inspector :", GUILayout.Width (85));
         * EditorGUILayout.PropertyField(SeeInspector, new GUIContent (""), GUILayout.Width (30));
         * EditorGUILayout.EndHorizontal ();
         */
        GUIStyle style_Yellow_01     = new GUIStyle(GUI.skin.box);   style_Yellow_01.normal.background = Tex_01;
        GUIStyle style_Blue          = new GUIStyle(GUI.skin.box);   style_Blue.normal.background = Tex_03;
        GUIStyle style_Purple        = new GUIStyle(GUI.skin.box);   style_Purple.normal.background = Tex_04;
        GUIStyle style_Orange        = new GUIStyle(GUI.skin.box);   style_Orange.normal.background = Tex_05;
        GUIStyle style_Yellow_Strong = new GUIStyle(GUI.skin.box);   style_Yellow_Strong.normal.background = Tex_02;

        /*
         * EditorGUILayout.BeginVertical (style_Yellow_01);
         * displayFeedbackWhenPuzzleIsLocked(style_Yellow_01);
         * EditorGUILayout.EndVertical();
         *
         * EditorGUILayout.BeginVertical(style_Orange);
         * displayVoiceOverWhenPuzzleIsLocked(style_Orange);
         * EditorGUILayout.EndVertical();
         */
        EditorGUILayout.LabelField("");
        EditorGUILayout.BeginVertical(style_Yellow_01);
        EditorGUILayout.LabelField("Call Methods during loading Process", EditorStyles.boldLabel);

        displayAllTheMethods_ObjIsActivated(style_Yellow_01, style_Yellow_01);

        displayAllTheMethods_ObjIsDeactivated(style_Yellow_01, style_Yellow_01);
        EditorGUILayout.EndVertical();


        EditorGUILayout.LabelField("");

        EditorGUILayout.BeginVertical(style_Blue);
        EditorGUILayout.LabelField("Save Extention", EditorStyles.boldLabel);
        displayAllTheMethods_SaveExtend(style_Blue, style_Blue);
        displayAllTheMethods_SaveExtend_LoadProcess(style_Blue, style_Blue);
        EditorGUILayout.EndVertical();

        serializedObject.ApplyModifiedProperties();
    }
コード例 #2
0
    //--> display a Method call when game is saved
    private void displayAllTheMethods_SaveExtend(GUIStyle style_Yellow_01, GUIStyle style_Blue)
    {
        #region
        //--> Display feedback
        isObjectActivated myScript = (isObjectActivated)target;

        methodModule.displayOneMethod("Method call when game is saved:",
                                      editorMethods,
                                      methodsListSaveExtend,
                                      myScript.methodsListSaveExtend,
                                      style_Blue,
                                      style_Yellow_01,
                                      "Method must be string method. " +
                                      "\nOther method will be ignored.");

        #endregion
    }
コード例 #3
0
    //--> display a Method call when game is saved
    private void displayAllTheMethods_SaveExtend_LoadProcess(GUIStyle style_Yellow_01, GUIStyle style_Blue)
    {
        #region
        //--> Display feedback
        isObjectActivated myScript = (isObjectActivated)target;

        methodModule.displayOneMethod("Method call during Loading Process:",
                                      editorMethods,
                                      methodsListSaveExtendLoadProcess,
                                      myScript.methodsListSaveExtendLoadProcess,
                                      style_Blue,
                                      style_Yellow_01,
                                      "Methods must be void method with a string argument. " +
                                      "\nOther method will be ignored.");

        #endregion
    }
コード例 #4
0
    //--> display a list of methods call during the loading Process if the object need to be deactivated
    private void displayAllTheMethods_ObjIsDeactivated(GUIStyle style_Yellow_01, GUIStyle style_Blue)
    {
        #region
        //--> Display feedback
        isObjectActivated myScript = (isObjectActivated)target;

        methodModule.displayMethodList("Methods call when the object need to be deactivated:",
                                       editorMethods,
                                       methodsListObjDeactivated,
                                       myScript.methodsListObjDeactivated,
                                       style_Blue,
                                       style_Yellow_01,
                                       "The methods are called in the same order as the list. " +
                                       "\nAll methods must be boolean methods. " +
                                       "\nOther methods will be ignored.");

        #endregion
    }