123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Newtonsoft;
- using Newtonsoft.Json;
- using System;
- namespace DataTools
- {
- [Serializable]
- public class Progress
- {
- [SerializeField]
- [JsonProperty]
- private int chapter;
- [SerializeField]
- [JsonProperty]
- private int action;
- [SerializeField]
- [JsonProperty]
- private int quest;
- [SerializeField]
- [JsonProperty]
- private string questId;
- [SerializeField]
- [JsonProperty]
- private string location;
- [SerializeField]
- [JsonProperty]
- private bool timeUnfinished = false;
- [SerializeField]
- [JsonProperty]
- private int currentConversationIndex = 0;
- [SerializeField]
- [JsonProperty]
- private int assitanceIndex = 0;
- [Header("GIGS PLAYED")]
- [SerializeField]
- [JsonProperty]
- private List<Gig> gigsPlayed = new List<Gig>();
- // Should be loaded from firebase
- [JsonProperty]
- [SerializeField]
- private int highestMilestone;
- public Progress(int chapter, int quest, int action, string location, int hMilestone = 500)
- {
- this.chapter = chapter;
- this.quest = quest;
- this.action = action;
- this.location = location;
- this.gigsPlayed.Clear();
- this.highestMilestone = hMilestone;
- }
- [JsonIgnore]
- public int AssitanceIndex
- {
- get
- {
- return assitanceIndex;
- }
- set
- {
- assitanceIndex = value;
- }
- }
- [JsonIgnore]
- public int CurrentConversationIndex
- {
- get
- {
- return currentConversationIndex;
- }
- set
- {
- currentConversationIndex = value;
- }
- }
- [JsonIgnore]
- public bool TimeUnfinished
- {
- get
- {
- return timeUnfinished;
- }
- set
- {
- timeUnfinished = value;
- }
- }
- [JsonIgnore]
- public List<Gig> GigsPlayed
- {
- get
- {
- return gigsPlayed;
- }
- set
- {
- gigsPlayed = value;
- }
- }
- [JsonIgnore]
- public int Chapter
- {
- get
- {
- return chapter;
- }
- set
- {
- chapter = value;
- }
- }
- [JsonIgnore]
- public string QuestId
- {
- get
- {
- return questId;
- }
- set
- {
- questId = value;
- }
- }
- [JsonIgnore]
- public int Quest
- {
- get
- {
- return quest;
- }
- set
- {
- quest = value;
- }
- }
- [JsonIgnore]
- public int Action
- {
- get
- {
- return action;
- }
- set
- {
- action = value;
- }
- }
- [JsonIgnore]
- public string Location
- {
- get
- {
- return location;
- }
- set
- {
- location = value;
- }
- }
- [JsonIgnore]
- public int HighestMilestone
- {
- get
- {
- return highestMilestone;
- }
- set
- {
- highestMilestone = value;
- }
- }
- public void ReachedMilestonePosition(int maxMilestone)
- {
- // lower means higher relatively to leader board
- if (maxMilestone < highestMilestone)
- highestMilestone = maxMilestone;
- }
- }
- }
|