コード例 #1
0
ファイル: BattleReward.cs プロジェクト: jyllsarta/nekofade
 public void set(BattleReward.RewardType rewardType, int amount, string rewardName = "")
 {
     this.rewardType = rewardType;
     this.amount     = amount;
     this.rewardName = rewardName;
     amountText.text = amount.ToString();
 }
コード例 #2
0
    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);
    }