示例#1
0
    //////////////////////////////////////////

    //Get settings, set to MapLayout, and save
    public void SaveMapLayout()
    {
        MapLayout = new C_MapLayout();
        MapLayout.tileLocations = Board.instance.GetMarkedTiles();

        MapLayout.buildingTypeIDs = Buildings.instance.GetBuildingTypes();

        MapLayout.buildingLocations = Buildings.instance.GetBuildingLocations();

        MapLayout.tileAttributes = Board.instance.GetTileAttributes();

        //Save to XML file
        XMLSerialization.Serialize <C_MapLayout>(MapLayout, _fullFileNamePath);
    }
示例#2
0
    //////////////////////////////////////////

    public void LoadMapLayout()
    {
        //Load from XML file
        MapLayout = XMLSerialization.Deserialize <C_MapLayout>(_fullFileNamePath);
    }