예제 #1
0
        private void DrawShowCursorSection()
        {
            EditorWindowTools.DrawHorizontalLine();
            ShowCursorOnConversation showCursor = pcObject.GetComponent <ShowCursorOnConversation>();
            bool showCursorFlag = (showCursor != null);

            if (!showCursorFlag)
            {
                EditorGUILayout.HelpBox("If regular gameplay hides the mouse cursor, tick Show Mouse Cursor to enable it during conversations.", MessageType.Info);
            }
            EditorGUILayout.BeginHorizontal();
            showCursorFlag = EditorGUILayout.Toggle(showCursorFlag, GUILayout.Width(ToggleWidth));
            EditorGUILayout.LabelField("Show mouse cursor during conversations", EditorStyles.boldLabel);
            EditorGUILayout.EndHorizontal();
            if (showCursorFlag)
            {
                if (showCursor == null)
                {
                    showCursor = pcObject.AddComponent <ShowCursorOnConversation>();
                }
            }
            else
            {
                DestroyImmediate(showCursor);
            }
        }
예제 #2
0
        private void DrawReviewStage()
        {
            EditorGUILayout.LabelField("Review", EditorStyles.boldLabel);
            EditorWindowTools.StartIndentedSection();
            EditorGUILayout.HelpBox("Your Player is ready! Below is a summary of the configuration.\n\nPlayer configuration can sometimes be complex. This wizard can't anticipate every possible character design. If your player doesn't behave the way you expect, " +
                                    "please examine the components on the player and make adjustments as necessary. Often, you may need to add additional gameplay components, such as your own controller or camera scripts, to the Set Component Enabled On Dialogue Event component in the Gameplay/Conversation Transition section.", MessageType.Info);
            var simpleController     = pcObject.GetComponent <PixelCrushers.DialogueSystem.Demo.SimpleController>();
            var navigateOnMouseClick = pcObject.GetComponent <PixelCrushers.DialogueSystem.Demo.NavigateOnMouseClick>();

            if (simpleController != null)
            {
                EditorGUILayout.LabelField("Control: Third-Person Shooter Style");
            }
            else if (navigateOnMouseClick != null)
            {
                EditorGUILayout.LabelField("Control: Follow Mouse Clicks");
            }
            else
            {
                EditorGUILayout.LabelField("Control: Custom");
            }
            switch (GetSelectorType())
            {
            case SelectorType.CenterOfScreen: EditorGUILayout.LabelField("Targeting: Center of Screen"); break;

            case SelectorType.CustomPosition: EditorGUILayout.LabelField("Targeting: Custom Position (you must set Selector.CustomPosition)"); break;

            case SelectorType.MousePosition: EditorGUILayout.LabelField("Targeting: Mouse Position"); break;

            case SelectorType.Proximity: EditorGUILayout.LabelField("Targeting: Proximity"); break;

            default: EditorGUILayout.LabelField("Targeting: None"); break;
            }
            SetComponentEnabledOnDialogueEvent enabler = FindConversationEnabler();

            if (enabler != null)
            {
                ShowDisabledComponents(enabler.onStart);
            }
            ShowCursorOnConversation showCursor = pcObject.GetComponentInChildren <ShowCursorOnConversation>();

            if (showCursor != null)
            {
                EditorGUILayout.LabelField("Show Cursor During Conversations: Yes");
            }
            var positionSaver = pcObject.GetComponentInChildren <PositionSaver>();

            EditorGUILayout.LabelField(string.Format("Save Position: {0}", (positionSaver != null) ? "Yes" : "No"));
            EditorWindowTools.EndIndentedSection();
            DrawNavigationButtons(true, true, true);
        }
예제 #3
0
        private void DrawReviewStage()
        {
            EditorGUILayout.LabelField("Review", EditorStyles.boldLabel);
            EditorWindowTools.StartIndentedSection();
            EditorGUILayout.HelpBox("Your Player is ready! Below is a summary of the configuration.", MessageType.Info);
            SimpleController     simpleController     = pcObject.GetComponent <SimpleController>();
            NavigateOnMouseClick navigateOnMouseClick = pcObject.GetComponent <NavigateOnMouseClick>();

            if (simpleController != null)
            {
                EditorGUILayout.LabelField("Control: Third-Person Shooter Style");
            }
            else if (navigateOnMouseClick != null)
            {
                EditorGUILayout.LabelField("Control: Follow Mouse Clicks");
            }
            else
            {
                EditorGUILayout.LabelField("Control: Custom");
            }
            switch (GetSelectorType())
            {
            case SelectorType.CenterOfScreen: EditorGUILayout.LabelField("Targeting: Center of Screen"); break;

            case SelectorType.CustomPosition: EditorGUILayout.LabelField("Targeting: Custom Position (you must set Selector.CustomPosition)"); break;

            case SelectorType.MousePosition: EditorGUILayout.LabelField("Targeting: Mouse Position"); break;

            case SelectorType.Proximity: EditorGUILayout.LabelField("Targeting: Proximity"); break;

            default: EditorGUILayout.LabelField("Targeting: None"); break;
            }
            SetEnabledOnDialogueEvent enabler = FindConversationEnabler();

            if (enabler != null)
            {
                ShowDisabledComponents(enabler.onStart);
            }
            ShowCursorOnConversation showCursor = pcObject.GetComponentInChildren <ShowCursorOnConversation>();

            if (showCursor != null)
            {
                EditorGUILayout.LabelField("Show Cursor During Conversations: Yes");
            }
            PersistentPositionData persistentPositionData = pcObject.GetComponentInChildren <PersistentPositionData>();

            EditorGUILayout.LabelField(string.Format("Save Position: {0}", (persistentPositionData != null) ? "Yes" : "No"));
            EditorWindowTools.EndIndentedSection();
            DrawNavigationButtons(true, true, true);
        }