public void set(BattleReward.RewardType rewardType, int amount, string rewardName = "") { this.rewardType = rewardType; this.amount = amount; this.rewardName = rewardName; amountText.text = amount.ToString(); }
public void addReward(BattleReward.RewardType rewardType, int amount, string rewardName = "") { BattleReward createdChild = Instantiate <BattleReward>(prefab, contentsArea.transform); createdChild.set(rewardType, amount, rewardName); rewards.Add(createdChild); }