public override void OnEnter() { if (hideOnSelected && targetSequence.GetExecutionCount() > 0) { Continue(); return; } Choose.Option option = new Choose.Option(); option.optionText = optionText; option.targetSequence = targetSequence; Choose.options.Add(option); Continue(); }
public override void OnEnter() { if (hideOnSelected && wasSelected) { Continue(); return; } Choose.Option option = new Choose.Option(); option.optionText = optionText; // Note: Variable substitution happens in the Choose command (as late as possible) option.targetSequence = targetSequence; option.action = () => { wasSelected = true; DoSetOperation(); // Set variable (if one is specified) }; Choose.options.Add(option); Continue(); }