public Resource(ResourceType type, Point location, int size) : base(new Rectangle(location.X * Map.TileSize, location.Y * Map.TileSize, size * Map.TileSize, size * Map.TileSize)) { Type = type; Texture = type.NormalTexture; Amount = type.AmountOfResources; Size = size; Radius = (size * Map.TileSize) / 2f; X = location.X; Y = location.Y; //setOccupiedPathNodes(); Resources.Add(this); }
static ResourceType() { Roks = new ResourceType(); Roks.Name = "Roks"; Roks.NormalTexture = Game1.Game.Content.Load<Texture2D>("WC2Gold"); Roks.DepletedTexture = Game1.Game.Content.Load<Texture2D>("WC2Gold"); Roks.CargoTexture = Game1.Game.Content.Load<Texture2D>("rock"); Roks.AmountOfResources = 500; Roks.Size = 3; }