Exemplo n.º 1
0
 public Board(Encounter encounter, BoardShape boardShape, Vector2 position, Vector2 dimensions, int tileSize, int tileGameSize, BoardTextureSet textureSet) : base(new Vector2(dimensions.X * tileSize / 2, dimensions.Y * tileSize / 2) + position)
 {
     this.encounter    = encounter;
     this.textureSet   = textureSet;
     this.tileGameSize = tileGameSize;
     if (boardShape == BoardShape.Square)
     {
         LaySquareBoard(dimensions, tileSize);
     }
 }
Exemplo n.º 2
0
        public DnDManager(Library library, Dictionary <string, Texture2D> monsterTextures, ContextMenuTextureSet menuTextureSet, BoardTextureSet boardTextureSet)
        {
            manager = this;

            ongoingRolls    = new List <Roll>();
            encounters      = new List <Encounter>();
            ongoingControls = new List <Control>();

            DnDManager.monsterTextures          = new Dictionary <string, Texture2D>(monsterTextures);
            this.menuTextureSet                 = menuTextureSet;
            this.boardTextureSet                = boardTextureSet;
            SpellBook.baseContextMenuTextureSet = menuTextureSet;

            InitializeLibraryLists();

            AddLibrary(library);

            contextMenu = null;
        }
Exemplo n.º 3
0
 public Board MakeSquareBoard(Vector2 position, Vector2 boardDimensions, int boardTileSize, BoardTextureSet textureSet, int boardTileGameSize = 5)
 {
     return(board = new Board(this, BoardShape.Square, position, boardDimensions, boardTileSize, boardTileGameSize, textureSet));
 }
Exemplo n.º 4
0
        public Encounter(Library library, Vector2 boardDimensions, int boardTileSize, BoardTextureSet boardTextureSet, ContextMenuTextureSet menuTextureSet, List <Creature> creatures = null, List <int> teams = null, List <Vector2> positions = null)
        {
            this.library = library;
            DnDManager.encounters.Add(this);
            turn            = 0;
            creatures       = new List <Creature>();
            initiativeOrder = new List <Creature>();
            creatures       = new List <Creature>();

            contextMenuTextures = menuTextureSet;

            if (creatures != null)
            {
                for (int i = 0; i < creatures.Count; i++)
                {
                    this.creatures.Add(creatures[i]);
                    creatures[i].SetToTile(board.Tile(positions[i]));
                }
            }

            MakeSquareBoard(new Vector2(0, 0), boardDimensions, boardTileSize, boardTextureSet);
        }
Exemplo n.º 5
0
        public Encounter(DnDManager manager, Vector2 boardDimensions, int boardTileSize, BoardTextureSet boardTextureSet)
        {
            DnDManager.encounters.Add(this);
            library             = DnDManager.libraries[0];
            contextMenuTextures = manager.menuTextureSet;
            turn            = 0;
            creatures       = new List <Creature>();
            initiativeOrder = new List <Creature>();

            MakeSquareBoard(new Vector2(0, 0), boardDimensions, boardTileSize, boardTextureSet);
        }
Exemplo n.º 6
0
 public void LoadBoardTextures()
 {
     boardTextureSet                  = new BoardTextureSet();
     boardTextureSet.tileTexture      = Content.Load <Texture2D>("boardTile");
     boardTextureSet.tileHoverTexture = Content.Load <Texture2D>("hoverBoardSquareOverlay");
 }