Exemple #1
0
    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);
    }
Exemple #2
0
 public void SetupTurretButton(TurretShopTurrets turretShopTurrets)
 {
     turretImage.sprite = turretShopTurrets.TurretShopSprite;
     turretCost.text    = turretShopTurrets.TurretShopCost.ToString();
 }