Пример #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        Quests myScript = (Quests)target;

        EditorGUILayout.LabelField("Ingame quest test control", EditorStyles.boldLabel);
        if (EditorApplication.isPlayingOrWillChangePlaymode)
        {
            if (GUILayout.Button("Set one random quest as active"))
            {
                myScript.SetRandomQuestActive();
            }
            if (GUILayout.Button("Fill active quests"))
            {
                myScript.FillActiveQuests();
            }
            if (GUILayout.Button("Reselect active quests"))
            {
                myScript.ReselectActiveQuests();
            }
            if (GUILayout.Button("Fullfill active quests"))
            {
                myScript.FullfillActiveQuests();
            }
            if (GUILayout.Button("Abort active quests"))
            {
                myScript.AbortActiveQuests();
            }
            if (GUILayout.Button("Reset Questbook"))
            {
                myScript.ResetQuestbook();
            }
        }
        else
        {
            EditorGUILayout.HelpBox("Ingame control is only available if game is in play mode.", MessageType.Info);
        }
    }