You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
667 B
36 lines
667 B
using UnityEngine; |
|
using System; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
|
|
namespace Fungus.Script |
|
{ |
|
[CommandName("Set Dialog")] |
|
[CommandCategory("Dialog")] |
|
[HelpText("Sets the active dialog for displaying story text with the Say command.")] |
|
public class SetDialog : FungusCommand |
|
{ |
|
public DialogController dialogController; |
|
|
|
public override void OnEnter() |
|
{ |
|
if (dialogController != null) |
|
{ |
|
Say.dialogController = dialogController; |
|
} |
|
|
|
Continue(); |
|
} |
|
|
|
public override string GetSummary() |
|
{ |
|
if (dialogController == null) |
|
{ |
|
return "Error: No dialog selected"; |
|
} |
|
|
|
return dialogController.name; |
|
} |
|
} |
|
|
|
} |