Esempio n. 1
0
    private void StartDelivery()
    {
        List <int> checkedDeliverySpots = new List <int>();
        GameObject Deliverables;

        for (int i = 0; i < ItemsPerDelivery; i++)
        {
            DeliverySpot DropSpot = AvailableDeliveryPoints[Random.Range(0, AvailableDeliveryPoints.Count - 1)];
            AvailableDeliveryPoints.Remove(DropSpot);
            int index = Random.Range(0, ItemsSpawned.Count - 1);
            Deliverables = ItemsSpawned[index];
            RemoveItemFromList(ItemsSpawned[index]);

            DropSpot.StartDelivery(Deliverables);
        }



        TimeUntilNextDelivery = TimeBetweenDeliveries + Time.time;
    }
Esempio n. 2
0
 public void CompleteDelivery(DeliverySpot spot)
 {
     AvailableDeliveryPoints.Add(spot);
 }