40 lines
777 B
C#
40 lines
777 B
C#
using System.Collections.Generic;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
[System.Serializable]
|
|
public class MissionReward
|
|
{
|
|
[SerializeField]
|
|
public List<EquippableItem> Items = new List<EquippableItem>();
|
|
|
|
[SerializeField]
|
|
public int Cash = 0;
|
|
|
|
public MissionReward() { }
|
|
|
|
public MissionReward(List<EquippableItem> _items, int _cash)
|
|
{
|
|
Items = _items;
|
|
Cash = _cash;
|
|
}
|
|
|
|
public void SetCash(int newValue)
|
|
{
|
|
Cash = newValue;
|
|
}
|
|
|
|
public void IncreaseCash(int amountToAdd)
|
|
{
|
|
Cash += amountToAdd;
|
|
}
|
|
|
|
public void AddItemToRewards(Item _item)
|
|
{
|
|
Items.Add((EquippableItem)_item);
|
|
}
|
|
public void AddItemToRewards(EquippableItem _item)
|
|
{
|
|
Items.Add(_item);
|
|
}
|
|
} |