예제 #1
0
    public void Build(Species s)
    {
        if (!CanBuild(s))
        {
            return;
        }

        Biomass -= s.CostNext();
        s.Build();
    }
예제 #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;
        }
    }
예제 #3
0
 public bool CanBuild(Species s)
 {
     return(Biomass >= s.CostNext());
 }