コード例 #1
0
ファイル: AddOption.cs プロジェクト: bursaar/TheFacility
		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();
		}
コード例 #2
0
ファイル: AddOption.cs プロジェクト: bursaar/TheFacility
        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();
        }
コード例 #3
0
        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();
        }