private void Start()
        {
            dialogue = GetComponent <DialogueBehaviour>();
            flow     = dialogue.Conversation;

            player = GameObject.FindWithTag("Player").transform;
        }
Exemple #2
0
        void OnEnable()
        {
            myTarget = (DialogueBehaviour)target;

            _skinNames.CollectSkins(myTarget.Conversation.DefaultSkin, null, 0);
            myTarget.Conversation.CameraController.OnEnable();

            FindProperty("Graph");
            FindProperty("ActorEnabled");
            FindProperty("ActorName");
            FindProperty("ActorPortrait");

            FindProperty("Conversation.Enabled");
            FindProperty("Conversation.Trigger.Mode");
            FindProperty("Conversation.Trigger.PlayerTag");
            FindProperty("Conversation.Trigger.Distance");
            FindProperty("Conversation.UseAutoExit");
            FindProperty("Conversation.ExitDelay");
            FindProperty("Conversation.ExitDistance");
            FindProperty("Conversation.OverridePlayerPosition");
            FindProperty("Conversation.PlayerTag");
            FindProperty("Conversation.PlayerPosition");
            FindProperty("Conversation.UseDefaultSkin");

            FindProperty("AmbientDialogue.Enabled");
            FindProperty("AmbientDialogue.Once");
            FindProperty("AmbientDialogue.Time");
            FindProperty("AmbientDialogue.Trigger.Mode");
            FindProperty("AmbientDialogue.Trigger.PlayerTag");
            FindProperty("AmbientDialogue.Trigger.Distance");
            FindProperty("AmbientDialogue.Offset");

            FindProperty("ExternalEventEnable");
        }
Exemple #3
0
 public void OnDisapear(DialogueBehaviour b, float time)
 {
     LastShown = time;
     if (OnDialogueFinished != null)
     {
         OnDialogueFinished(b);
     }
 }
Exemple #4
0
        public override void OnInspectorGUI()
        {
            if (_titleStyle == null)
            {
                _titleStyle           = new GUIStyle(EditorStyles.boldLabel);
                _titleStyle.alignment = TextAnchor.MiddleCenter;
            }

            DialogueBehaviour myTarget = (DialogueBehaviour)target;
            float             width    = EditorGUIUtility.currentViewWidth;

            RunemarkGUI.inspectorTitle.Draw("Dialogue Behaviour",
                                            "This component compiles the dialogue graph in runtime, also it " +
                                            "commincates with the ui and other systems.");

            serializedObject.Update();

            // DIALOGUE GRAPH
            GUILayout.BeginVertical("box");
            EditorGUILayout.Space();

            DrawPropertyField("Graph", graphLabel);

            if (myTarget.Graph == null)
            {
                EditorGUILayout.HelpBox("Step 1: Select a dialogue", MessageType.Error);
            }

            EditorGUILayout.Space();
            GUILayout.EndVertical();

            if (myTarget.Graph != null)
            {
                EditorGUILayout.Space();

                ActorDetails();
                ConversationDetails();
                AmbientDetails();
                ExternalEvents();
            }
            serializedObject.ApplyModifiedProperties();
        }