Example #1
0
    public ConstructionDeliverJob(ICollectable collectable, BuildingPlaceHolder construction, Vector2 location) : base(location, 1, null)
    {
        this.collectable  = collectable;
        this.construction = construction;
        Location          = location;

        OnJobCompleted += () => { construction.AddResource(collectable); };
        OnJobCompleted += () => { Owner.Collectable = null; };
    }
Example #2
0
    public ConstructionCollectJob(BuildingPlaceHolder construction, Resource res, Vector2 location) : base(location, 1, null)
    {
        this.construction = construction;

        collectable = res;
        Location    = location;

        OnJobCompleted += () => { Owner.Collectable = collectable; };
        OnJobCompleted += () => { NewDeliverJob(); };
    }
 private void Start()
 {
     building = buildingPlaceHolders[0];
 }
 /// <summary>
 /// Sets the building to construct in enable this mode
 /// </summary>
 /// <param name="id"></param>
 public void setBuilding(int id)
 {
     building = buildingPlaceHolders[id];
 }