public void Bind(Building availableBuilding) { _clickerComponent = availableBuilding; this.Name.text = availableBuilding.name; this.Cost.text = _clickerManager.BuildingCost(availableBuilding).ToString(); this.Description.text = string.Format("+{0} {1}s per second", availableBuilding.YieldAmount.Amount, availableBuilding.YieldAmount.Currency.name); _button = this.GetComponent <Button>(); _clickerManager.OnTick.AddListener(IsActive); IsActive(); }
public void Bind(Building availableBuilding) { _component = availableBuilding; this.Name.text = availableBuilding.Name; this.Cost.text = _clickerManager.BuildingCost(availableBuilding).ToString(); }