using System; using System.Collections.Generic; // Всё, что сохраняется в progress.json (отдельно от save.json с ресурсами и зданиями). // JsonUtility умеет: числа, строки, bool, массивы, List<> из [Serializable]-классов. [Serializable] public class MailItem { public int id; public string title; public string body; public long sentTicks; public bool read; public bool claimed; public List rewards = new List(); public bool HasRewards { get { return rewards != null && rewards.Count > 0; } } } [Serializable] public class TrainingOrder { public int troopIndex; public int count; public long startTicks; public long endTicks; } [Serializable] public class ArenaOpponent { public string name; public int power; public int rating; } [Serializable] public class ProgressData { // --- Профиль --- public string playerName = "Командир"; public string playerId = ""; public int avatarIndex = 0; public int level = 1; public int xp = 0; public long firstLaunchTicks = 0; public int daysPlayed = 0; public int lastLoginDay = -1; // --- Настройки --- public float musicVolume = 0.8f; public float soundVolume = 0.8f; public bool vibration = true; public bool notifications = true; public int quality = 1; // 0 низкое, 1 среднее, 2 высокое public bool fps60 = true; // --- Статистика (для профиля и заданий) --- public float[] collected = new float[8]; // индекс = (int)ResourceType public int battlesWon; public int battlesLost; public int troopsTrained; public int arenaFights; public int arenaWins; public int questsDone; // --- Задания --- public List claimedQuests = new List(); public int dailyDay = -1; public List claimedDaily = new List(); public float[] dailyCollected = new float[8]; public int dailyBattles; public int dailyTroops; public int dailyArena; public int dailyMarches; // --- Награда за вход --- public int loginRewardIndex = 0; // какой день из 7 следующий public int lastLoginRewardDay = -1; // --- Почта --- public List mail = new List(); public int nextMailId = 1; public bool starterMailSent; // --- Магазин --- public int shopDay = -1; public List shopIds = new List(); public List shopCounts = new List(); // --- Герой --- public int heroLevel = 1; // --- Войска --- public int[] troops = new int[4]; public List training = new List(); // --- Бой (кампания) --- public int battleStage = 1; // --- Арена --- public int arenaRating = 1000; public int arenaTickets = 5; public long arenaTicketTicks = 0; public List arenaOpponents = new List(); // --- Глобальная карта --- public List settlements = new List(); public List marches = new List(); public List reports = new List(); public int nextMarchId = 1; public int marchesSent; public int worldWins; public int worldLosses; // --- Большая карта мира (сцена WorldMap, код Саши) --- public List sashaMarches = new List(); public List sashaMarchUnits = new List(); // --- Событие --- public int eventWeek = -1; public int eventPoints; public int eventTroopRemainder; public List eventClaimed = new List(); }