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."); }
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); }
public void Kill(int uid) { foreach (WaveComponent wc in waveComps) { if (wc.pool.despawn(uid)) { return; } } UILog.AddText("Failed to kill" + uid); }
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); } }
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; } } }
public void OnDeath() { UILog.AddText("Unit: " + entity.UID.ToString() + " has died!"); Destroy(waypoint.gameObject); }