public void Update(Watchtower watch) { /*if (this.Watchtower == null || this.Watchtower.timestamp < watch.timestamp) * { * this.Watchtower = watch; * }*/ }
public void Update(Watchtower watch) { if (this.Watchtower == null || this.Watchtower.timestamp < watch.timestamp) { this.Watchtower = watch; } }
public void addBuilding(GameObject go, string buildingType, Vector3 placeholderRot) { //unique identifiers for each go.name = "building " + buildingId; Building bldg; if (buildingType == "fence") { bldg = new Fence(go, placeholderRot); constructionProjects.Add(go.name, bldg); } else if (buildingType == "tower") { bldg = new Watchtower(go, placeholderRot); constructionProjects.Add(go.name, bldg); } else if (buildingType == "field") { bldg = new Field(go, placeholderRot); constructionProjects.Add(go.name, bldg); } buildingId++; }