123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- 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;
- }
- }
- }
|