Ejemplo n.º 1
0
 public override int OnChooseOption(EventOption[] options, int[] willpowerCost, EventContext context, Event e)
 {
     string[] texts = new string[options.Length];
     for(int i = 0; i < options.Length; ++i)
     {
         if (willpowerCost[i] > 0)
         {
             texts[i] = EventHelper.ReplaceStrings(options[i].Label, context) + " (Cost: " + willpowerCost[i] + " WP)";
         }
         else
             texts[i] = EventHelper.ReplaceStrings(options[i].Label, context);
     }
     bool[] enabled = willpowerCost.Select(cost => cost <= WillPower).ToArray();
     TextTopBottomButton view = new TextTopBottomButton(context.GetCharacters(), this, e.CreateActionDescription(context), texts, enabled, notificator);
     main.LaunchView(view);
     return view.SelectedIndex;
 }
Ejemplo n.º 2
0
 public virtual int OnChooseOption(EventOption[] options, int[] willpowerCost, EventContext context, Event e)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 public int ChooseOption(EventOption[] options, int[] willpowerCost, EventContext context, Event e)
 {
     return OnChooseOption(options, willpowerCost, context, e);
 }