コード例 #1
0
ファイル: Building.cs プロジェクト: umbreon222/MyHorizons
        public void Save(ISaveFile saveFile, int index)
        {
            var offsets = MainOffsets.GetOffsets(saveFile.GetRevision());

            if (index >= offsets.Building_Count)
            {
                throw new IndexOutOfRangeException("Index was greater than the number of building slots!");
            }
            saveFile.WriteStruct(offsets.Offset_Buildings + index * 0x14, this);
        }