示例#1
0
    public WareHouseDeliverJob(ICollectable collectable, Vector2 location) : base(location, 1, null)
    {
        this.collectable = collectable;

        WareHouse wareHouse = BuildingManager.Instance.GetWareHouse();

        Location = wareHouse.GetRandomSpace();

        OnJobCompleted += () => { Owner.Collectable = null; };
        OnJobCompleted += () => { wareHouse.Deliver(Location, collectable); };
    }