private void Initialize(TileProperties[,] tileProperties, int size) { this.tileSize = size; this.halfTileSize = this.tileSize / 2f; this.Columns = tileProperties.GetUpperBound(0) + 1; this.Rows = tileProperties.GetUpperBound(1) + 1; this.actorToPoint = new Dictionary<Actor, Vector2i>(); this.pointToActor = new Dictionary<Vector2i, Actor>(); this.Tiles = new Tile[this.Columns, this.Rows]; for (int ii = 0; ii < this.Columns; ii++) { for (int jj = 0; jj < this.Rows; jj++) { var tile = new Tile(tileProperties[ii,jj]); tile.x = ii * this.tileSize + this.tileSize / 2; tile.y = jj * this.tileSize + this.tileSize / 2; tile.width = tile.height = this.tileSize; this.Tiles[ii, jj] = tile; } } }
private void Initialize(TileProperties[,] tileProperties) { this.halfTileSize = AwayTeam.TileSize / 2f; this.Columns = tileProperties.GetUpperBound(0) + 1; this.Rows = tileProperties.GetUpperBound(1) + 1; this.Tiles = new Tile[this.Columns, this.Rows]; for (int ii = 0; ii < this.Columns; ii++) { for (int jj = 0; jj < this.Rows; jj++) { var tile = new Tile(tileProperties[ii,jj]); tile.x = ii * AwayTeam.TileSize + this.halfTileSize; tile.y = jj * AwayTeam.TileSize + this.halfTileSize; tile.width = tile.height = AwayTeam.TileSize; this.Tiles[ii, jj] = tile; } } this.actors = new List<Actor>(); }
private void Initialize(TileProperties[,] tileProperties, int size) { this.tileSize = size; this.halfTileSize = this.tileSize / 2f; this.Columns = tileProperties.GetUpperBound(0) + 1; this.Rows = tileProperties.GetUpperBound(1) + 1; this.actorToPoint = new Dictionary<Actor, Vector2i>(); this.pointToActor = new Dictionary<Vector2i, Actor>(); this.highlightedIndicies = new List<Vector2i>(); this.Tiles = new Tile[this.Columns, this.Rows]; this.highlights = new FSprite[this.Columns, this.Rows]; for (int ii = 0; ii < this.Columns; ii++) { for (int jj = 0; jj < this.Rows; jj++) { var highlightSprite = new FSprite("bluehighlight"); highlightSprite.x = ii * this.tileSize + this.tileSize / 2; highlightSprite.y = jj * this.tileSize + this.tileSize / 2; highlightSprite.isVisible = false; highlightSprite.width = highlightSprite.height = this.tileSize; this.highlights[ii, jj] = highlightSprite; var tile = new Tile(tileProperties[ii,jj]); tile.x = ii * this.tileSize + this.tileSize / 2; tile.y = jj * this.tileSize + this.tileSize / 2; tile.width = tile.height = this.tileSize; this.Tiles[ii, jj] = tile; } } this.mouseManager = new MouseManager(this); }
private void Initialize(TileProperties[,] tileProperties, int size) { this.tileSize = size; this.halfTileSize = this.tileSize / 2f; this.Width = tileProperties.GetUpperBound(0) + 1; this.Height = tileProperties.GetUpperBound(1) + 1; this.actorToPoint = new Dictionary<Actor, Vector2i>(); this.pointToActor = new Dictionary<Vector2i, Actor>(); this.Tiles = new Tile[this.Width, this.Height]; for (int ii = 0; ii < this.Width; ii++) { for (int jj = 0; jj < this.Height; jj++) { var tile = new Tile(tileProperties[ii,jj]); tile.x = ii * this.tileSize + this.tileSize / 2; tile.y = jj * this.tileSize + this.tileSize / 2; tile.width = tile.height = this.tileSize; this.Tiles[ii, jj] = tile; } } this.mouseManager = new MouseManager(this); this.tileInterface = new TileInterface(this); }