public void OnBuild(GameObject building, Building.BuildingType buildingtype) { Debug.Log(buildingtype.ToString()); if (buildingtype == Building.BuildingType.House) { House house = building.GetComponent <House>(); MaxPopulation += house.Room; es.MaxEnemies++; buildings.Add(house); HouseNumber++; } if (buildingtype == Building.BuildingType.Post) { Debug.Log("WTF4"); Towers.Add(building); } if (buildingtype == Building.BuildingType.TownCenter) { TownCenter = building; } if (buildingtype == Building.BuildingType.ResourceStorage) { buildings.Add(building.GetComponent <StorageArea>()); } }
public override string ToString() { return($"Type : {type.ToString()}, Position {position}, Level : {level}, CurrentActiveAmount : {currentActiveAmount}, Constructing Status : {constructionStatus.isConstructing} " + $" Current active amount : {CurrentActiveAmount}/{maxActiveAmount}, Represent GO : {representGameObject.name}"); }