public Resources(Provinces provinces, Units units, BiDictionary<int, string> realmsTagId) { Stockpiles = new Dictionary<int, Stockpile>(); foreach (var pair in realmsTagId) { Stockpiles.Add(pair.Key, new Stockpile()); } _provinces = provinces; _units = units; }
public MapView(Provinces provinces, Units units, RenderInstruction[][] standardInstrs, RenderInstruction[][] idleInstrs, DialogManager dialogMgr, Wars wars) { _provinces = provinces; _units = units; _wars = wars; _dialogMgr = dialogMgr; _provinceSelection = new ProvinceSelection(); _unitsSelection = new UnitsSelection(); _standardInstrs = standardInstrs; _idleInstrs = idleInstrs; _labelBoxes = provinces.Boundaries.Select(mpoly => mpoly.Polys[0].FindBestLabelBox()).ToArray(); // The boundary depends on the size of the army text, // so the actual boxes are written in the draw method. _labelClickableBoundaries = new Dictionary<int, AABB>(); _units.OnDelete += _unitsSelection.Deselect; }