Exemplo n.º 1
0
        public Units(Provinces provinces, Wars wars, EventController events)
        {
            _provinces = provinces;
            _wars = wars;
            _events = events;

            ProvinceArmies = new Dictionary<int, ISet<int>>();
            Armies =  new Dictionary<int, Army>();
        }
Exemplo n.º 2
0
        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;
        }