示例#1
0
        public TerrainSource(Initializer init, World world)
        {
            String path = init.findDataOr("terrain.cachePath", "../data/terrain/chunks/world.chunk");

            myChunkCache = new TerrainCache(path);
            myWorld      = world;
        }
示例#2
0
        public TerrainServer(TerrainCache db, TerrainGenerator generator)
        {
            myTerrainDb = db;
            myGenerator = generator;

            this.myTcpListener    = new TcpListener(IPAddress.Any, 4567);
            this.myListenerThread = new Thread(new ThreadStart(listenForClients));
            this.myListenerThread.Start();
        }
示例#3
0
 public TerrainPager(World w)
 {
     myWorld         = w;
     myTerrainSource = w.terrainSource;
     myDatabase      = w.database;
     myChunks        = w.chunks;
     interestChunk   = new Vector3i(-10000000, -10000000, -1000000);
     interestPoint   = new Vector3();
 }
示例#4
0
 public override void loadWorld(string worldName)
 {
     myChunkCache = new TerrainCache(worldName);
 }