Scriptum/Assets/Scripts/REFACTORING/Application/Mission/MissionReward.cs

40 lines
777 B
C#
Raw Permalink Normal View History

2022-12-04 18:42:34 +01:00
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);
}
}