Esempio n. 1
0
    /// <summary>
    /// Puts resources in attached resource controller from caravan
    /// </summary>
    /// <param name="other">Caravan with resources</param>
    void deliverResources(Collider caravan)
    {
        RTSUnitInventory inv = caravan.GetComponent <RTSUnitInventory>();

        foreach (var v in inv.inventory)
        {
            attachedController.AddResource(v.CargoType);
        }
        inv.inventory.Clear();
    }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     inventory = GetComponent<RTSUnitInventory>();
     health = GetComponent<HealthController>();
 }