static void Blueprints() { DrawingBoard.DrawObjects(buildMenu, new Vector2(537, 580), 1, 0, new Rectangle(0, 0, 846, 535)); DrawingBoard.DrawObjects(house_kame, new Vector2(600, 650), 1, 0, new Rectangle(0, 0, 100, 150)); DrawingBoard.DrawObjects(WallWoodHorizontal, new Vector2(750, 650), 1, 0, new Rectangle(0, 0, 50, 100)); DrawingBoard.DrawObjects(WallWoodVertical, new Vector2(800, 650), 1, 0, new Rectangle(0, 0, 50, 100)); DrawingBoard.DrawObjects(WallWoodCornerLeft, new Vector2(850, 650), 1, 0, new Rectangle(0, 0, 50, 100)); DrawingBoard.DrawObjects(WallWoodCornerRight, new Vector2(900, 650), 1, 0, new Rectangle(0, 0, 50, 100)); DrawingBoard.DrawObjects(WallWoodBackLeft, new Vector2(950, 650), 1, 0, new Rectangle(0, 0, 50, 100)); DrawingBoard.DrawObjects(WallWoodBackRight, new Vector2(1000, 650), 1, 0, new Rectangle(0, 0, 50, 100)); DrawingBoard.DrawObjects(mine, new Vector2(1050, 650), 1, 0, new Rectangle(0, 0, 100, 100)); DrawingBoard.DrawObjects(cabin1, new Vector2(1150, 650), 1, 0, new Rectangle(0, 0, 100, 100)); spriteBatch.Draw(DrawingBoard.Tiles[100, 1, 5], new Vector2(1250, 600), Color.White); spriteBatch.Draw(DrawingBoard.Tiles[300, 1, 5], new Vector2(600, 850), Color.White); spriteBatch.Draw(player, new Vector2(700, 850), Color.Red); spriteBatch.Draw(player, new Vector2(800, 850), Color.Teal); spriteBatch.Draw(player, new Vector2(900, 850), Color.LightGray); spriteBatch.Draw(player, new Vector2(1000, 850), Color.Brown); spriteBatch.Draw(player, new Vector2(1100, 850), Color.Yellow); spriteBatch.Draw(player, new Vector2(1200, 850), Color.Blue); spriteBatch.Draw(player, new Vector2(1300, 850), Color.White); spriteBatch.Draw(player, new Vector2(1400, 850), Color.Black); spriteBatch.Draw(enemy, new Vector2(600, 950), Color.White); spriteBatch.Draw(player, new Vector2(700, 950), Color.Black); spriteBatch.DrawString(font, $"Spawn Camp", new Vector2(500, 980), Color.DarkViolet); spriteBatch.DrawString(font, $"Spawn Village", new Vector2(700, 980), Color.DarkViolet); spriteBatch.DrawString(font, $"Spawn Bonfire", new Vector2(900, 980), Color.DarkViolet); }
static void WorkerList() { int[] array = new int[10]; DrawingBoard.DrawObjects(workerList, new Vector2(50, 50), 1, 0, new Rectangle(0, 0, 510, 825)); for (int i = 0; i < Player.Workers.Count; i++) { array = Player.Workers[i].Stats; spriteBatch.Draw(player, new Vector2(80, 80 + i * 50), Color.White); spriteBatch.DrawString(font, $": {array[0]} | {array[1]} | {array[2]} | {array[3]} | {array[4]} | {array[5]} | " + $"{array[6]} | {array[7]} | {array[8]} | {array[9]}", new Vector2(135, 80 + i * 50), Color.Black); } }
static void Inventory() { DrawingBoard.DrawObjects(inventory, new Vector2(1400, 200), 5, 0, new Rectangle(0, 0, 122, 174)); if (newMouseState.RightButton == ButtonState.Pressed) { DrawingBoard.DrawObjects(idCardBack, new Vector2(50, 150), 1, 0, new Rectangle(0, 0, 1200, 732)); spriteBatch.DrawString(font, $"Gathering: {Player.player.Stats[11]} ", new Vector2(370, 450), Color.Black); spriteBatch.DrawString(font, $"Wood Cutting: {Player.player.Stats[12]} ", new Vector2(370, 500), Color.Black); spriteBatch.DrawString(font, $"Mining: {Player.player.Stats[14]}", new Vector2(370, 550), Color.Black); spriteBatch.DrawString(font, $"Construction: {Player.player.Stats[17] }", new Vector2(370, 600), Color.Black); spriteBatch.DrawString(font, $"Hunting: {Player.player.Stats[18]}", new Vector2(370, 650), Color.Black); spriteBatch.DrawString(font, $"LVL {(int)Player.player.Stats[11] / 50}", new Vector2(750, 450), Color.Gold); spriteBatch.DrawString(font, $"LVL {(int)Player.player.Stats[12] / 500}", new Vector2(750, 500), Color.Gold); spriteBatch.DrawString(font, $"LVL {(int)Player.player.Stats[14] / 50}", new Vector2(750, 550), Color.Gold); spriteBatch.DrawString(font, $"LVL {(int)Player.player.Stats[17] / 20}", new Vector2(750, 600), Color.Gold); spriteBatch.DrawString(font, $"LVL {(int)Player.player.Stats[18] / 10}", new Vector2(750, 650), Color.Gold); } else { DrawingBoard.DrawObjects(idCard, new Vector2(50, 150), 1, 0, new Rectangle(0, 0, 1200, 732)); spriteBatch.DrawString(font, $"Experience: {Player.player.Stats[10]}", new Vector2(50, 450), Color.DarkViolet); spriteBatch.DrawString(font, $"Workers: {Player.Workers.Count} / {Player.player.resources[10]}", new Vector2(50, 500), Color.Blue); //spriteBatch.DrawString(font, $"Gold: {Player.player.gold}", new Vector2(50, 550), Color.DarkGoldenrod); spriteBatch.DrawString(font, $"Water: {Player.player.resources[2]}", new Vector2(50, 600), Color.DarkBlue); spriteBatch.DrawString(font, $"Vines: {Player.player.resources[3]}", new Vector2(50, 650), Color.ForestGreen); spriteBatch.DrawString(font, $"Meat: {Player.player.resources[4]}", new Vector2(50, 700), Color.Crimson); spriteBatch.DrawString(font, $"Lumber: {Player.player.resources[5]}", new Vector2(50, 750), Color.SaddleBrown); spriteBatch.DrawString(font, $"Vitality: {Player.player.Stats[11]}", new Vector2(370, 350), Color.Black); spriteBatch.DrawString(font, $"Physique: {Player.player.Stats[12]}", new Vector2(370, 400), Color.Black); spriteBatch.DrawString(font, $"Agility: {Player.player.Stats[13]}", new Vector2(370, 450), Color.Black); spriteBatch.DrawString(font, $"Combat: {Player.player.Stats[14]}", new Vector2(370, 500), Color.Black); spriteBatch.DrawString(font, $"Magic: {Player.player.Stats[15]}", new Vector2(370, 550), Color.Black); spriteBatch.DrawString(font, $"Knowledge: {Player.player.Stats[16]}", new Vector2(370, 600), Color.Black); spriteBatch.DrawString(font, $"Leadership: {Player.player.Stats[17]}", new Vector2(370, 650), Color.Black); spriteBatch.DrawString(font, $"Sociability: {Player.player.Stats[18]}", new Vector2(370, 700), Color.Black); spriteBatch.DrawString(font, $"Expertise: {Player.player.Stats[19]}", new Vector2(980, 220), Color.Gold); } }
static void LocalUnits(List <Unit> localWorkers, List <Unit> localEnemies) { if (localWorkers.Count > 0) { foreach (Unit unit in localWorkers) { int x = Check.Range((Player.player.DrawX - ((Player.player.X - unit.X) * CurrentTileSize)), CurrentTileSize, (int)(1920 - CurrentTileSize)); int y = Check.Range((Player.player.DrawY - ((Player.player.Y - unit.Y) * CurrentTileSize)), CurrentTileSize, (int)(1080 - CurrentTileSize)); spriteBatch.Draw(DrawingBoard.Allies[2, unit.LastMove, unit.AnimationFrame], new Rectangle(x - (CurrentTileSize / 2), y - (CurrentTileSize / 2), CurrentTileSize, CurrentTileSize), Color.White); DrawingBoard.DrawObjects(DrawingBoard.HPBar[0], new Vector2(x, y + CurrentTileSize), tileScale, 0, new Rectangle(0, 0, 50, 10)); DrawingBoard.DrawObjects(DrawingBoard.HPBar[1], new Vector2(x, y + CurrentTileSize + (int)(2 * tileScale)), tileScale, 0, new Rectangle(0, 0, 50, 6)); } } if (localEnemies.Count > 0) { foreach (Unit unit in localEnemies) { int x = Check.Range((Player.player.DrawX - ((Player.player.X - unit.X) * CurrentTileSize)), CurrentTileSize, (int)(1920 - CurrentTileSize)); int y = Check.Range((Player.player.DrawY - ((Player.player.Y - unit.Y) * CurrentTileSize)), CurrentTileSize, (int)(1080 - CurrentTileSize)); int x2 = Check.Range(Player.player.tileX - (Player.player.X - unit.X), 0, (displayWidth / CurrentTileSize)); int y2 = Check.Range(Player.player.tileY - (Player.player.Y - unit.Y), 0, (displayHeight / CurrentTileSize)); spriteBatch.Draw(DrawingBoard.Enemies[0, unit.LastMove, 0], TileFrame[x2, y2], Color.White); //DrawingBoard.DrawObjects(DrawingBoard.Enemies[0, unit.LastMove, 0], new Vector2(x, y), tileScale, 0, new Rectangle(0, 0, 50, 50)); DrawingBoard.DrawObjects(DrawingBoard.HPBar[0], new Vector2(x, y + CurrentTileSize), tileScale, 0, new Rectangle(0, 0, 50, 10)); int maxHP = (2 + unit.Stats[11] + unit.Stats[12]); spriteBatch.Draw(DrawingBoard.HPBar[1], new Rectangle(x - (CurrentTileSize / 2), y - (CurrentTileSize / 2) + CurrentTileSize, (int)((48 * ((double)unit.Stats[1] / maxHP)) * tileScale), (int)(6 * tileScale)), Color.White); } } /*if (Player.Animations.Count > 0) * { * int count = 0; * for (int i = 0; i < Player.Animations.Count(); i++) * { * Animation animation = Player.Animations[i - count]; * int x = (Player.player.DrawX - ((Player.player.X - animation.X) * CurrentTileSize)); * int y = (Player.player.DrawY - ((Player.player.Y - animation.Y) * CurrentTileSize)); * spriteBatch.Draw(DrawingBoard.Animations[animation.ID][animation.Frame], new Rectangle(x - (CurrentTileSize / 2), y - (CurrentTileSize / 2), 5 * CurrentTileSize, 5 * CurrentTileSize), Color.White); * * if (animation.Frame == 73) * { * Player.Animations.RemoveAt(i - count); * count += 1; * } * else * { * animation.Frame += 1; * } * } * }*/ if (Player.WorldItems.Count > 0) { foreach (KeyValuePair <GPS, int> item in Player.WorldItems) { int x = (item.Key.X - cameraLocationX) * CurrentTileSize; int y = (item.Key.Y - cameraLocationY) * CurrentTileSize; spriteBatch.Draw(DrawingBoard.Items[item.Value], new Rectangle(x, y, CurrentTileSize, CurrentTileSize), Color.White); } } }