Exemplo n.º 1
0
 public void Update(Watchtower watch)
 {
     /*if (this.Watchtower == null || this.Watchtower.timestamp < watch.timestamp)
      * {
      *  this.Watchtower = watch;
      * }*/
 }
Exemplo n.º 2
0
 public void Update(Watchtower watch)
 {
     if (this.Watchtower == null || this.Watchtower.timestamp < watch.timestamp)
     {
         this.Watchtower = watch;
     }
 }
Exemplo n.º 3
0
    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++;
    }