コード例 #1
0
        public DrawCell_FillRectIfSelected(ISelectionInfo sel, Color clr)
        {
            _clr = clr;
            _sel = sel;

            sel.SelectionChanged += (object sender, SelectionChangedEventArgs e) => {
                changed(this, null);                 // TODO we wouldn't necessary have to pass null here?  more specific info.
            };
        }
コード例 #2
0
        public virtual void Choose <T>(ISelectionInfo <T> selectionInfo)
        {
            if (selectionInfo.IsAutomatic)
            {
                return;
            }

            foreach (var choice in ChoicesToMake)
            {
                selectionInfo.Add((T)choice);
            }
        }
コード例 #3
0
 public IEnumerable <ActionInfo> CreateAction(ISource source, ISelectionInfo <ITarget> targets, GameState gameState)
 {
     return(targets.ConfirmedSelection.Select(target => GetActionInfo(source, target, gameState)));
 }