using System; using UnityEngine; using Newtonsoft.Json; namespace DataTools { [Serializable] public class Currency { [JsonProperty] [SerializeField] private int glam; [JsonProperty] [SerializeField] private int experience; [JsonProperty] [SerializeField] private int dollars; [JsonProperty] [SerializeField] private int motivation; [JsonProperty] [SerializeField] private int level; public Currency(int glam = 0, int experience = 0, int dollars = 0, int motivation = 0, int level = 0) { this.glam = glam; this.experience = experience; this.dollars = dollars; this.motivation = motivation; this.level = level; } [JsonIgnore] public int Glam { get { return glam; } set { glam = value; } } [JsonIgnore] public int Experience { get { return experience; } set { experience = value; } } [JsonIgnore] public int Dollars { get { return dollars; } set { dollars = value; } } [JsonIgnore] public int Motivation { get { return motivation; } set { motivation = value; } } [JsonIgnore] public int Level { get { return level; } set { level = value; } } public void AddReward(int glam, int experience, int dollars, int motivation) { this.glam += glam; this.experience += experience; this.dollars += dollars; this.motivation += motivation; } } }