コード例 #1
0
        protected override void ActionLogic(EventSetting eventSetting)
        {
            int newSetting = GetNewInt("Enter new setting value:", "Event settings", eventSetting.GetValue().ToString());

            if (newSetting != -1)
            {
                // Limits value to min/max value when present
                if (min != -1)
                {
                    if (newSetting < min)
                    {
                        newSetting = min;
                    }
                }
                if (max != -1)
                {
                    if (newSetting > max)
                    {
                        newSetting = max;
                    }
                }

                eventSetting.SetValue(newSetting);
            }
        }
コード例 #2
0
 public Boolean PerformAction(EventSetting setting)
 {
     if (!isActionPerformed)
     {
         ActionLogic(setting);
         isActionPerformed = true;
         return(true);
     }
     return(false);
 }
コード例 #3
0
 protected abstract void ActionLogic(EventSetting setting);