123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /* 本文件中包含2各类文件
- * UserProperty用于保存用户游戏中的相关数据
- * GameRunningData 保存游戏中全局的数据 */
- public static class UserProperty
- {
- // Start is called before the first frame update
- public static int userId = 1;
- public static string name = "任天堂";
- public static int coin = 1005;
- public static DateTime tokenExpireTime;
- //public static Dictionary<string, int> foods = new();
- //public static Dictionary<string, int> toys = new();
- //public static Dictionary<string, int> others = new();
- public static Dictionary<string, List<ItemStock>> itemStocks; // 这里dict string对应的是物品大类food, toy, other
- public static List<DogProperty> dogs = new();
- }
- // string id 表示具体的物品id,如food_00001
- // qty 表示数量
- public class ItemStock
- {
- public string id;
- public int qty;
- public ItemStock(string id, int qty)
- {
- this.id = id;
- this.qty = qty;
- }
- }
- // 游戏运行中的数据
- public static class GameRunningData
- {
- public static string focusDogId = null; // 游戏中目前游玩的dog id。
- }
|