public void Destroy(Species s) { if (!CanDestroy(s)) { return; } Biomass += s.CostPrevious().Value; s.Destroy(); }
private void Update() { if (species != null) { BuildButton.GetComponentInChildren <Text>().text = "" + species.CostNext(); BuildButton.interactable = game.CanBuild(species); DestroyButton.GetComponentInChildren <Text>().text = "" + species.CostPrevious(); DestroyButton.interactable = game.CanDestroy(species); Quantity.text = "" + species.count; } }
public bool CanDestroy(Species s) { return(s.CostPrevious() != null); }