Exemple #1
0
 /// <summary>
 /// creates a minimap at _position
 /// </summary>
 /// <param name="_position">top left position of the minimap</param>
 /// <param name="map">the map the minimap ist created from</param>
 public Minimap(Vector2 _position, Map map)
 {
     position = _position;
     individualScale = .5f;
     itemList = new List<Icon>();
     playerList = new List<Icon>();
     miniMap = new Icon[Settings.getMapSizeX(), Settings.getMapSizeZ()];
     for (int x = 0; x < Settings.getMapSizeX(); x++)
     {
         for (int z = 0; z < Settings.getMapSizeZ(); z++)
         {
             miniMap[x, z] = map.getBlockAt(x, z).minimapIcon;
             miniMap[x, z].setIndividualScale(individualScale);
             miniMap[x, z].setPosition(new Vector2(position.X + miniMap[0, 0].getWidth() * x, position.Y + miniMap[0, 0].getHeight() * z));
         }
     }
 }