From a4aab4e597bca042d03bc73e92966ea1fe3dbf5a Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 13 Mar 2014 14:22:23 +0000 Subject: [PATCH] Added AddOption() command with empty action --- Assets/Fungus/Scripts/GameController.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Assets/Fungus/Scripts/GameController.cs b/Assets/Fungus/Scripts/GameController.cs index 8edf6199..19bfcd2c 100644 --- a/Assets/Fungus/Scripts/GameController.cs +++ b/Assets/Fungus/Scripts/GameController.cs @@ -178,6 +178,18 @@ namespace Fungus commandQueue.AddCommand(new Command.AddOptionCommand(optionText, optionAction)); } + /** + * Adds an option with no action to the current list of player options. + * This method returns immediately but it queues an asynchronous command for later execution. + * @param optionText The text to be displayed for this option + * @param optionAction The Action delegate method to be called when the player selects the option + */ + public void AddOption(string optionText) + { + CommandQueue commandQueue = Game.GetInstance().commandQueue; + commandQueue.AddCommand(new Command.AddOptionCommand(optionText, delegate {})); + } + /** * Display all previously added options as buttons, with no text prompt. * This method returns immediately but it queues an asynchronous command for later execution.