public void launch()
 {
     if (exceedsCapacity)
     {
         UILog.AddText("Can't launch! Over Capacity!");
         return;
     }
     showUI(false);
     daysUntilSupply = supplyWait;
     UILog.AddText("Supply Shipped launched! Arriving in " + daysUntilSupply + " days.");
 }
Пример #2
0
 public void Kill(Critter obj)
 {
     foreach (WaveComponent wc in waveComps)
     {
         if (wc.pool.despawn(obj.gameObject))
         {
             return;
         }
     }
     UILog.AddText("Failed to kill" + obj.name + obj.entity.UID);
 }
Пример #3
0
 public void Kill(int uid)
 {
     foreach (WaveComponent wc in waveComps)
     {
         if (wc.pool.despawn(uid))
         {
             return;
         }
     }
     UILog.AddText("Failed to kill" + uid);
 }
Пример #4
0
 public void updateResources()
 {
     foreach (StructureController struc in allStrucs)
     {
         if (struc.product.type == Resource.Type.Power)
         {
             Resource.addCapacity(struc.product.type, struc.product.capacity);
         }
         else
         {
             Resource.addResource(struc.product.type, struc.product.amount);
         }
         UILog.AddText("Supplying " + struc.name);
     }
 }
Пример #5
0
    public void placeStruc(Ray ray)
    {
        RaycastHit hit;

        if (Physics.Raycast(ray, out hit))
        {
            if (hit.collider.gameObject.GetComponent <Entity>() == null)
            {
                Instantiate(placing, hit.point, Quaternion.identity);
                if (placing.GetComponent <StructureController>())
                {
                    Resource.addResource(Resource.Type.Power, placing.gameObject.GetComponent <StructureController>().powerCost);
                    Resource.addResource(Resource.Type.BuildingMaterial, -placing.GetComponent <StructureController>().buildingMaterialCost);
                }
                isPlacing = false;
                UILog.AddText("Placing: " + placing.name);
                placing = null;
            }
        }
    }
Пример #6
0
 public void OnDeath()
 {
     UILog.AddText("Unit: " + entity.UID.ToString() + " has died!");
     Destroy(waypoint.gameObject);
 }