private void ResetAllUnits() { AttackingUnits.Clear(); DefendingUnits.Clear(); for (int i = 1; i <= 3; i++) { var attackingUnit = new AttackingUnit($"Attacking Unit {i}"); AttackingUnits.Add(attackingUnit); var defendingUnit = new DefendingUnit($"Defending Unit {i}"); DefendingUnits.Add(defendingUnit); } aucAttackingUnit1.RegisterUnit(AttackingUnits[0]); aucAttackingUnit2.RegisterUnit(AttackingUnits[1]); aucAttackingUnit3.RegisterUnit(AttackingUnits[2]); ducDefendingUnit1.RegisterUnit(DefendingUnits[0]); ducDefendingUnit2.RegisterUnit(DefendingUnits[1]); ducDefendingUnit3.RegisterUnit(DefendingUnits[2]); txtOutput.ResetText(); radNone.Checked = true; }
private void DefendingUnitControl_Load(object sender, EventArgs e) { DefendingUnit = new DefendingUnit("<<NAME>>"); SetupDataBindings(); }
public void RegisterUnit(DefendingUnit defendingUnit) { DefendingUnit = defendingUnit; SetupDataBindings(); }