Browse Source

Added AddOption() command with empty action

master
chrisgregan 11 years ago
parent
commit
a4aab4e597
  1. 12
      Assets/Fungus/Scripts/GameController.cs

12
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.

Loading…
Cancel
Save