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()
372
372
/// Start the dialogue, in other word same as start a conversation.
373
373
/// </summary>
374
374
/// <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 )
376
376
{
377
377
if ( ! mInitialized )
378
378
{
@@ -382,22 +382,22 @@ public void ActiveDialogue(JCS_DialogueScript script)
382
382
// Activate it on the next frame!
383
383
this . gameObject . SetActive ( true ) ;
384
384
385
- return ;
385
+ return false ;
386
386
}
387
387
388
388
mDialogueScript = script ;
389
389
390
390
if ( mActive )
391
391
{
392
- Debug . LogWarning ( "Dialogue System is already active! " ) ;
393
- return ;
392
+ Debug . LogWarning ( "Dialogue System is already active" ) ;
393
+ return false ;
394
394
}
395
395
396
396
// check if the script attached is available?
397
397
if ( DialogueScript == null )
398
398
{
399
399
Debug . LogWarning ( "Can't run dialogue system without the dialogue script" ) ;
400
- return ;
400
+ return false ;
401
401
}
402
402
403
403
// reset the action, so it will always start
@@ -416,6 +416,8 @@ public void ActiveDialogue(JCS_DialogueScript script)
416
416
417
417
// Play the active dialogue sound.
418
418
JCS_SoundManager . instance . GlobalSoundPlayer ( ) . PlayOneShot ( mActiveSound ) ;
419
+
420
+ return true ;
419
421
}
420
422
421
423
/// <summary>
You can’t perform that action at this time.
0 commit comments