Ejemplo n.º 1
0
 void Update()
 {
     if (ContentLoader.Instance == null)
     {
         return;
     }
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap   = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null && worldMap != null)
     {
         GenerateRegionMeshes();
         GenerateMesh();
     }
     if (worldMap != null)
     {
         if (DFConnection.Instance.HasWorldMapPositionChanged())
         {
             CopyFromRemote(worldMap);
         }
         else
         {
             if (GameSettings.Instance.rendering.drawClouds)
             {
                 CopyClouds(worldMap);
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void Add(string regionName, string path)
 {
     if (!RegionMaps.Any(w => w.Count <= 5))
     {
         RegionMaps.Add(new List <MapFile>());
     }
     RegionMaps.First(w => w.Count <= 5).Add(new MapFile()
     {
         RegionName = regionName, Path = path
     });
 }
Ejemplo n.º 3
0
 void OnConnectToDF()
 {
     enabled    = true;
     regionMaps = DFConnection.Instance.PopRegionMapUpdate();
     worldMap   = DFConnection.Instance.PopWorldMapUpdate();
     if (regionMaps != null && worldMap != null)
     {
         GenerateRegionMeshes();
     }
     if (worldMap != null)
     {
         CopyFromRemote(worldMap);
     }
 }