Exemplo n.º 1
0
    public void Destroy(Species s)
    {
        if (!CanDestroy(s))
        {
            return;
        }

        Biomass += s.CostPrevious().Value;
        s.Destroy();
    }
Exemplo n.º 2
0
    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;
        }
    }
Exemplo n.º 3
0
 public bool CanDestroy(Species s)
 {
     return(s.CostPrevious() != null);
 }