Esempio n. 1
0
 public void Clone(BuildingKnowledge buildingKnowledge)
 {
     path           = buildingKnowledge.path;
     buildingIDPool = buildingKnowledge.buildingIDPool;
     buildings.Clear();
     for (int i = 0; i < buildingKnowledge.buildings.Count; ++i)
     {
         BuildingType buildingType = new BuildingType();
         buildingType.Clone(buildingKnowledge.buildings [i]);
         buildings.Add(buildingType);
     }
 }
Esempio n. 2
0
    void CloneBuildingType(BuildingType building)
    {
        if (buildingType == null)
        {
            buildingType = new BuildingType();
        }

        buildingType.Clone(building);

        if (buildingType.tilePath.Length > 0)
        {
            buildingType.tileBase = AssetDatabase.LoadAssetAtPath <Tile> (buildingType.tilePath);
        }
    }