File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Assets/JCSUnity/Scripts/UI/Dialogue Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ public void RunAction()
372372 /// Start the dialogue, in other word same as start a conversation.
373373 /// </summary>
374374 /// <param name="script"> Script to use to run the dialogue. </param>
375- public void ActiveDialogue ( JCS_DialogueScript script )
375+ public bool ActiveDialogue ( JCS_DialogueScript script )
376376 {
377377 if ( ! mInitialized )
378378 {
@@ -382,22 +382,22 @@ public void ActiveDialogue(JCS_DialogueScript script)
382382 // Activate it on the next frame!
383383 this . gameObject . SetActive ( true ) ;
384384
385- return ;
385+ return false ;
386386 }
387387
388388 mDialogueScript = script ;
389389
390390 if ( mActive )
391391 {
392- Debug . LogWarning ( "Dialogue System is already active! " ) ;
393- return ;
392+ Debug . LogWarning ( "Dialogue System is already active" ) ;
393+ return false ;
394394 }
395395
396396 // check if the script attached is available?
397397 if ( DialogueScript == null )
398398 {
399399 Debug . LogWarning ( "Can't run dialogue system without the dialogue script" ) ;
400- return ;
400+ return false ;
401401 }
402402
403403 // reset the action, so it will always start
@@ -416,6 +416,8 @@ public void ActiveDialogue(JCS_DialogueScript script)
416416
417417 // Play the active dialogue sound.
418418 JCS_SoundManager . instance . GlobalSoundPlayer ( ) . PlayOneShot ( mActiveSound ) ;
419+
420+ return true ;
419421 }
420422
421423 /// <summary>
You can’t perform that action at this time.
0 commit comments