コード例 #1
0
ファイル: ByteArray.cs プロジェクト: vashage/MarsMiner
 internal static ByteArray FromSave(GameSave gameSave, Tuple<int, uint> address)
 {
     ByteArray byteArray;
     if (!gameSave.TryGetFromBlockStructureCache(address, out byteArray))
     {
         byteArray = new ByteArray(gameSave, address);
         gameSave.AddToBlockStructureCache(address, byteArray);
     }
     return byteArray;
 }
コード例 #2
0
ファイル: Chunk.cs プロジェクト: Tamschi/MarsMiner
        internal static Chunk FromSave(GameSave gameSave, Tuple <int, uint> address)
        {
            Chunk chunk;

            if (!gameSave.TryGetFromBlockStructureCache(address, out chunk))
            {
                chunk = new Chunk(gameSave, address);
                gameSave.AddToBlockStructureCache(address, chunk);
            }
            return(chunk);
        }
コード例 #3
0
        internal static SavedStateIndex FromSave(GameSave gameSave, Tuple <int, uint> address)
        {
            SavedStateIndex savedStateIndex;

            if (!gameSave.TryGetFromBlockStructureCache(address, out savedStateIndex))
            {
                savedStateIndex = new SavedStateIndex(gameSave, address);
                gameSave.AddToBlockStructureCache(address, savedStateIndex);
            }
            return(savedStateIndex);
        }
コード例 #4
0
        internal static StringBlock FromSave(GameSave gameSave, Tuple <int, uint> address)
        {
            StringBlock stringBlock;

            if (!gameSave.TryGetFromBlockStructureCache(address, out stringBlock))
            {
                stringBlock = new StringBlock(gameSave, address);
                gameSave.AddToBlockStructureCache(address, stringBlock);
            }
            return(stringBlock);
        }
コード例 #5
0
        internal static BlockTypeTable FromSave(GameSave gameSave, Tuple <int, uint> address)
        {
            BlockTypeTable blockTypeTable;

            if (!gameSave.TryGetFromBlockStructureCache(address, out blockTypeTable))
            {
                blockTypeTable = new BlockTypeTable(gameSave, address);
                gameSave.AddToBlockStructureCache(address, blockTypeTable);
            }
            return(blockTypeTable);
        }
コード例 #6
0
        internal static StringBlockStructureDictionary <TValue> FromSave(GameSave gameSave, Tuple <int, uint> address)
        {
            StringBlockStructureDictionary <TValue> stringBlockStructureDictionary;

            if (!gameSave.TryGetFromBlockStructureCache(address, out stringBlockStructureDictionary))
            {
                stringBlockStructureDictionary = new StringBlockStructureDictionary <TValue>(gameSave, address);
                gameSave.AddToBlockStructureCache(address, stringBlockStructureDictionary);
            }
            return(stringBlockStructureDictionary);
        }
コード例 #7
0
        internal static ByteArray FromSave(GameSave gameSave, Tuple <int, uint> address)
        {
            ByteArray byteArray;

            if (!gameSave.TryGetFromBlockStructureCache(address, out byteArray))
            {
                byteArray = new ByteArray(gameSave, address);
                gameSave.AddToBlockStructureCache(address, byteArray);
            }
            return(byteArray);
        }
コード例 #8
0
ファイル: Octree.cs プロジェクト: Tamschi/MarsMiner
        internal static Octree FromSave(GameSave gameSave, Tuple <int, uint> address)
        {
            Octree octree;

            if (!gameSave.TryGetFromBlockStructureCache(address, out octree))
            {
                octree = new Octree(gameSave, address);
                gameSave.AddToBlockStructureCache(address, octree);
            }
            return(octree);
        }
コード例 #9
0
ファイル: Chunk.cs プロジェクト: vashage/MarsMiner
 internal static Chunk FromSave(GameSave gameSave, Tuple<int, uint> address)
 {
     Chunk chunk;
     if (!gameSave.TryGetFromBlockStructureCache(address, out chunk))
     {
         chunk = new Chunk(gameSave, address);
         gameSave.AddToBlockStructureCache(address, chunk);
     }
     return chunk;
 }
コード例 #10
0
ファイル: ChunkTable.cs プロジェクト: vashage/MarsMiner
 internal static ChunkTable FromSave(GameSave gameSave, Tuple<int, uint> address)
 {
     ChunkTable chunkTable;
     if (!gameSave.TryGetFromBlockStructureCache(address, out chunkTable))
     {
         chunkTable = new ChunkTable(gameSave, address);
         gameSave.AddToBlockStructureCache(address, chunkTable);
     }
     return chunkTable;
 }
コード例 #11
0
ファイル: SavedStateIndex.cs プロジェクト: vashage/MarsMiner
 internal static SavedStateIndex FromSave(GameSave gameSave, Tuple<int, uint> address)
 {
     SavedStateIndex savedStateIndex;
     if (!gameSave.TryGetFromBlockStructureCache(address, out savedStateIndex))
     {
         savedStateIndex = new SavedStateIndex(gameSave, address);
         gameSave.AddToBlockStructureCache(address, savedStateIndex);
     }
     return savedStateIndex;
 }
コード例 #12
0
ファイル: Octree.cs プロジェクト: vashage/MarsMiner
 internal static Octree FromSave(GameSave gameSave, Tuple<int, uint> address)
 {
     Octree octree;
     if (!gameSave.TryGetFromBlockStructureCache(address, out octree))
     {
         octree = new Octree(gameSave, address);
         gameSave.AddToBlockStructureCache(address, octree);
     }
     return octree;
 }