Пример #1
0
 public Chunk loadChunk(int cx, int cy) {
   Chunk c = getChunk(cx, cy);
   if (c == null) {
     c = new Chunk(this, cx, cy);
     chunks.put(c.chunkIndex, c);
   }
   return c;
 }
Пример #2
0
 public Chunk getChunk(int cx, int cy) {
   return chunks.get(Chunk.getChunkIndex(cx, cy));
 }