private void CreateTurretCard(TurretShopTurrets turretShopTurrets) { GameObject newInstance = Instantiate(turretCardPrefab, turretPanelContainer.position, Quaternion.identity); newInstance.transform.SetParent(turretPanelContainer); newInstance.transform.localScale = Vector3.one; TurretCard cardButton = newInstance.GetComponent <TurretCard>(); cardButton.SetupTurretButton(turretShopTurrets); }
public void SetupTurretButton(TurretShopTurrets turretShopTurrets) { turretImage.sprite = turretShopTurrets.TurretShopSprite; turretCost.text = turretShopTurrets.TurretShopCost.ToString(); }