Exemplo n.º 1
0
 protected HexBoard(HexSize sizeHexes, HexSize gridSize, BoardStorage <Maybe <THex> > boardHexes)
 {
     BoardHexes      = boardHexes;
     MapScale        = 1.00F;
     IsTransposed    = false;
     MapSizeHexes    = sizeHexes;
     GridSize        = gridSize;
     HexCentreOffset = new HexSize(GridSize.Width * 2 / 3, GridSize.Height / 2);
     GridSizePixels  = new IntMatrix2D(GridSize.Width, 0,
                                       0, GridSize.Height,
                                       GridSize.Width / 3, GridSize.Height / 2);
 }
Exemplo n.º 2
0
        protected HexBoard(HexSize sizeHexes, HexSize gridSize, BoardStorage <Maybe <THex> > boardHexes)
        {
            BoardHexes      = boardHexes;
            MapScale        = 1.00F;
            IsTransposed    = false;
            MapSizeHexes    = sizeHexes;
            GridSize        = gridSize;
            HexCentreOffset = new HexSize(GridSize.Width * 2 / 3, GridSize.Height / 2);
            GridSizePixels  = new IntMatrix2D(GridSize.Width, 0,
                                              0, GridSize.Height,
                                              GridSize.Width / 3, GridSize.Height / 2);

            EntryCosts = new BlockedBoardStorage32x32 <Maybe <HexsideCosts> >(sizeHexes,
                                                                              hexCoords => HexsideCosts.EntryCosts(boardHexes, hexCoords), 1);
            ExitCosts = new BlockedBoardStorage32x32 <Maybe <HexsideCosts> >(sizeHexes,
                                                                             hexCoords => HexsideCosts.ExitCosts(boardHexes, hexCoords), 1);
        }
Exemplo n.º 3
0
        /// <summary>Creates a new instance of the MapDisplay class.</summary>
        protected MapDisplay(HexSize sizeHexes, HexSize gridSize, InitializeHex initializeHex,
                             IFastList <HexCoords> landmarkCoords, BoardStorage <Maybe <THex> > storage)
            : base(sizeHexes, gridSize, storage)
        {
            ResetLandmarksAsync(landmarkCoords);

            GoalHex          =
                HotspotHex   =
                    StartHex = HexCoords.EmptyUser;
            ShadeBrushAlpha  = 78;
            ShowFov          = true;
            ShowHexgrid      = true;
            ShowPath         = true;
            ShowPathArrow    = true;
            HexgridPath      = Extensions.InitializeDisposable(() =>
                                                               new GraphicsPath(HexgridPathPoints(gridSize), _hexgridPathPointTypes));
        }