private void ExecuteOpenActiveAttacksCommand(object parameter) { ActiveAttacksViewModel aavm = new ActiveAttacksViewModel(); if (aavm.IsOpen == false) { aavm.IsOpen = true; ActiveAttacks activeAttacks = new ActiveAttacks(); activeAttacks.DataContext = aavm; ShellFillerShell sfs = new ShellFillerShell() { DataContext = this }; sfs.MainScroll.Content = activeAttacks; sfs.Header.Text = (string)parameter; PlaceOrFocusControlInShell(ShellPosition.BOTTOM, sfs, false, null); return; } PlaceOrFocusControlInShell(ShellPosition.LEFT, null, true, "Connection Info"); }
private void Render_OnDraw() { foreach (var unit in ActiveAttacks.Select(p => p.Value.Target).Distinct()) { var damage = this.Predict(unit, 2f); Text.Draw(damage.ToString(), Color.Magenta, (Point)Game.WorldToScreen(unit.Position)); } }
public void Clear() { if (PlayerAttacks.Values.Sum(cards => cards.Count) > 0) { throw new InvalidOperationException("Cannot clear battle field until attack cards have been awarded."); } ActiveWars.Clear(); ActiveAttacks.Clear(); }