public void TestAddUniqueToList() { AVObject obj = new AVObject("Corgi"); obj.AddUniqueToList("emptyList", "gogo"); obj["existingList"] = new List <string>() { "gogo" }; Assert.True(obj.ContainsKey("emptyList")); Assert.AreEqual(1, obj.Get <List <object> >("emptyList").Count); obj.AddUniqueToList("existingList", "gogo"); Assert.True(obj.ContainsKey("existingList")); Assert.AreEqual(1, obj.Get <List <object> >("existingList").Count); obj.AddUniqueToList("existingList", 1); Assert.AreEqual(2, obj.Get <List <object> >("existingList").Count); obj.AddRangeUniqueToList("newRange", new List <string>() { "anti", "anti" }); Assert.AreEqual(1, obj.Get <List <object> >("newRange").Count); }
/// <summary> /// 查询数据 /// </summary> private void QueryData() { int score; string playerName; AVQuery <AVObject> query = new AVQuery <AVObject>("GameScore"); query.GetAsync("53706cd1e4b0d4bef5eb32ab").ContinueWith(t => { AVObject gameScore = t.Result;//如果成功获取,t.Result将是一个合法有效的AVObject score = gameScore.Get <int>("score"); playerName = gameScore.Get <string>("playerName"); }); }
void check(AVObject mygameScore) { int score = mygameScore.Get <int>("score"); string playerName = mygameScore.Get <string>("playerName"); Debug.Log(score); Debug.Log(playerName); AVQuery <AVObject> query = new AVQuery <AVObject>("GameScore"); query.GetAsync("53706cd1e4b0d4bef5eb32ab").ContinueWith(t => { AVObject gameScore = t.Result;//如果成功获取,t.Result将是一个合法有效的AVObject }); }
public async void GetObjWithId() { AVObject character = AVObject.CreateWithoutData("Sport", "5b4464a49f5454003b178628"); await character.FetchAsync().ContinueWith(t => { if (character.IsKeyDirty("totalTime")) { character.FetchAsync(); } Console.WriteLine("name:" + character.Get <string>("name")); Console.WriteLine("totalTime:" + character.Get <double>("totalTime")); //此处用int取小数的话,不会报错,会自动被转化为int Console.WriteLine("grade:" + character.Get <string>("grade")); //if(character.is) // Console.WriteLine("noExist:" + character.Get<string>("noExist")); //报异常 }); }
public void TestGet() { IObjectState state = new MutableObjectState { ObjectId = "waGiManPutr4Pet1r", ClassName = "Pagi", CreatedAt = new DateTime(), ServerData = new Dictionary <string, object>() { { "username", "kevin" }, { "sessionToken", "se551onT0k3n" } } }; AVObject obj = AVObjectExtensions.FromState <AVObject>(state, "Omitted"); Assert.AreEqual("kevin", obj.Get <string>("username")); Assert.Throws <InvalidCastException>(() => obj.Get <AVObject>("username")); Assert.Throws <KeyNotFoundException>(() => obj.Get <string>("missingItem")); }
public void SetMatch(AVUser user, AVObject villageObject) { CurMatchUser = user; CurMatchVillage = villageObject; lbMatchBeliefAll.text = villageObject.Get<int>("BeliefAll").ToString(); lbMatchUserName.text = user.Username; btnFight.gameObject.SetActive(true); }
public void SetMatch(AVUser user, AVObject villageObject) { CurMatchUser = user; CurMatchVillage = villageObject; lbMatchBeliefAll.text = villageObject.Get <int>("BeliefAll").ToString(); lbMatchUserName.text = user.Username; btnFight.gameObject.SetActive(true); }
public void TestAddUniqueToList() { AVObject obj = new AVObject("Corgi"); obj.AddUniqueToList("emptyList", "gogo"); obj["existingList"] = new List<string>() { "gogo" }; Assert.True(obj.ContainsKey("emptyList")); Assert.AreEqual(1, obj.Get<List<object>>("emptyList").Count); obj.AddUniqueToList("existingList", "gogo"); Assert.True(obj.ContainsKey("existingList")); Assert.AreEqual(1, obj.Get<List<object>>("existingList").Count); obj.AddUniqueToList("existingList", 1); Assert.AreEqual(2, obj.Get<List<object>>("existingList").Count); obj.AddRangeUniqueToList("newRange", new List<string>() { "anti", "anti" }); Assert.AreEqual(1, obj.Get<List<object>>("newRange").Count); }
public Task CheckTitle(AVObject todo) { var title = todo.Get <string>("title"); // reset value for title if (title.Length > 20) { todo["title"] = title.Substring(0, 20); } // returning any value will be ok. return(Task.FromResult(todo)); }
public string getItemType(int itemID) { isFind = false; AVQuery <AVObject> equipmentType = new AVQuery <AVObject>("equipment").WhereEqualTo("id", itemID); equipmentType.FirstAsync().ContinueWith(t => { AVObject myEquip1 = t.Result; string thistype = myEquip1.Get <string>("equipType"); isFind = true; return(thistype); }); return(null); }
public void TestRemoveAllFromList() { AVObject obj = new AVObject("Corgi"); obj["existingList"] = new List <string>() { "gogo", "Queen of Pain" }; obj.RemoveAllFromList("existingList", new List <string>() { "gogo", "missingItem" }); Assert.AreEqual(1, obj.Get <List <object> >("existingList").Count); }
public static VillageData CreateFromAVObject(AVObject obj) { VillageData villageData = new VillageData(); villageData.UserID = obj.Get<string>("UserID"); villageData.Defence = obj.Get<int>("Defence"); villageData.Power = obj.Get<int>("Power"); villageData.Trick = obj.Get<int>("Trick"); villageData.Belief = obj.Get<int>("Belief"); villageData.BeliefAll = obj.Get<int>("BeliefAll"); return villageData; }
void makeBag_consumable(string playId) { AVQuery <AVObject> playerBag = new AVQuery <AVObject>("BagConsumable").WhereEqualTo("objectId", playId); playerBag.FirstAsync().ContinueWith(t => { AVObject myBag = t.Result; for (int i = 0; i < 40; i++) { int x = myBag.Get <int>(string.Format("{0}", i)); PlayerData.Instance.itemList_c.Add(x, 0); } }); }
public static VillageData CreateFromAVObject(AVObject obj) { VillageData villageData = new VillageData(); villageData.UserID = obj.Get <string>("UserID"); villageData.Defence = obj.Get <int>("Defence"); villageData.Power = obj.Get <int>("Power"); villageData.Trick = obj.Get <int>("Trick"); villageData.Belief = obj.Get <int>("Belief"); villageData.BeliefAll = obj.Get <int>("BeliefAll"); return(villageData); }
public void getEnemyStatus(int enemyID) { AVQuery <AVObject> query = new AVQuery <AVObject>("enemy").WhereEqualTo("enemyId", enemyID); query.FirstAsync().ContinueWith(t => { AVObject myEnemy = t.Result; string name = myEnemy.Get <string>("enemyName"); //Debug.Log(name); EnemyStatus.instance.BaseStatus.EnemyName = name; EnemyStatus.instance.BaseStatus.S = myEnemy.Get <int>("S"); EnemyStatus.instance.BaseStatus.P = myEnemy.Get <int>("P"); EnemyStatus.instance.BaseStatus.D = myEnemy.Get <int>("D"); EnemyStatus.instance.BaseStatus.A = myEnemy.Get <int>("A"); EnemyStatus.instance.BaseStatus.I = myEnemy.Get <int>("I"); }); }
public void SendGetRankListMsgCS() { if (MainSystem.Instance.isOpenNetWork) { string userName = LoginSystem.Instance._userName; Debug.Log("NetWork SendGetRankListMsgCS " + userName); AVObject gameScore = new AVObject("GameScore"); AVQuery <AVObject> query = AVObject.GetQuery("GameScore"); query = query.WhereContains("playerName", userName).OrderByDescending("score"); query.FindAsync().ContinueWith(t => { Task task = Task.FromResult(0); int cnt = 0; List <int> list_score = new List <int>(); foreach (AVObject result in t.Result) { gameScore = result; if (cnt < 5) { cnt = cnt + 1; list_score.Add(gameScore.Get <int>("score")); } } Debug.Log("NetWork SendResultMsg get rank."); rankListTemp = list_score; _isRankListFinish = true; }); } else { _isRankListFinish = true; rankListTemp.Clear(); rankListTemp.Add(111); rankListTemp.Add(222); } }
public void Search() { var query = new AVQuery <AVObject>("Village").WhereNotEqualTo("UserID", AVUser.CurrentUser.ObjectId); query.FindAsync().ContinueWith(t => { List <AVObject> objList = new List <AVObject>(); objList.AddRange((t as Task <IEnumerable <AVObject> >).Result); if (objList.Count > 0) { var rand = new System.Random(); int r = rand.Next(objList.Count); AVObject villageObject = objList[r]; AVUser.Query.GetAsync(villageObject.Get <string>("UserID")).ContinueWith(t2 => { AVUser user = (t2 as Task <AVUser>).Result; GameManager.Instance.LastMatchUser = user; GameManager.Instance.LastMathVillage = villageObject; GameManager.Instance.EventQueue.Queue.Enqueue(new EventItem() { Type = EEventItemType.MatchFound }); }); } }); }
public static void DB_QueryPlayerVillageData() { AVQuery <AVObject> query = new AVQuery <AVObject>("Village").WhereEqualTo("UserID", AVUser.CurrentUser.ObjectId); query.FirstAsync().ContinueWith(t => { AVObject villageObject = (t as Task <AVObject>).Result; VillageData villageData = new VillageData(); villageData.UserID = villageObject.Get <string>("UserID"); villageData.Defence = villageObject.Get <int>("Defence"); villageData.Power = villageObject.Get <int>("Power"); villageData.Trick = villageObject.Get <int>("Trick"); villageData.Belief = villageObject.Get <int>("Belief"); villageData.BeliefAll = villageObject.Get <int>("BeliefAll"); GameManager.Instance.LastGetVillageData = villageData; Debug.LogWarning(villageData.UserID); AVQuery <AVObject> buildingQuery = new AVQuery <AVObject>("Building").WhereEqualTo("UserID", AVUser.CurrentUser.ObjectId); buildingQuery.FindAsync().ContinueWith(t2 => { List <BuildingData> buildingDataList = new List <BuildingData>(); foreach (AVObject buildingObject in (t2 as Task <IEnumerable <AVObject> >).Result) { BuildingData buildingData = new BuildingData(); buildingData.UserID = buildingObject.Get <string>("UserID"); buildingData.Type = (EBuildingType)buildingObject.Get <int>("Type"); buildingData.Level = buildingObject.Get <int>("Level"); buildingData.Value = buildingObject.Get <int>("Value"); buildingData.SlotID = buildingObject.Get <int>("SlotID"); buildingDataList.Add(buildingData); } GameManager.Instance.LastGetBuildingDataList = buildingDataList; GameManager.Instance.EventQueue.Queue.Enqueue(new EventItem() { Type = EEventItemType.PlayerVillageDataLoaded }); }); }); }
public void readHeroData(string heroID) { AVQuery <AVObject> query = new AVQuery <AVObject>("HeroData").WhereEqualTo("heroID", heroID); query.FirstAsync().ContinueWith(t => { AVObject myHero = t.Result; HeroStatus.instance.BaseStatus.HeroName = myHero.Get <string>("HeroName"); HeroStatus.instance.BaseStatus.HeroID = myHero.Get <string>("heroID"); HeroStatus.instance.BaseStatus.LV = myHero.Get <int>("LV"); HeroStatus.instance.BaseStatus.S = myHero.Get <int>("S"); HeroStatus.instance.BaseStatus.P = myHero.Get <int>("P"); HeroStatus.instance.BaseStatus.D = myHero.Get <int>("D"); HeroStatus.instance.BaseStatus.A = myHero.Get <int>("A"); HeroStatus.instance.BaseStatus.I = myHero.Get <int>("I"); HeroStatus.instance.BaseStatus.HP = myHero.Get <int>("HP"); HeroStatus.instance.BaseStatus.MP = myHero.Get <int>("MP"); HeroStatus.instance.BaseStatus.Comprehension = myHero.Get <int>("Comprehension"); HeroStatus.instance.BaseStatus.luck = myHero.Get <int>("luck"); HeroStatus.instance.BaseStatus.AtkValue = myHero.Get <int>("AtkValue"); HeroStatus.instance.BaseStatus.DefValue = myHero.Get <int>("DefValue"); HeroStatus.instance.BaseStatus.AValue = myHero.Get <int>("AValue"); HeroStatus.instance.BaseStatus.MagicAtk = myHero.Get <int>("MagicAtk"); HeroStatus.instance.BaseStatus.MagicDef = myHero.Get <int>("MagicDef"); HeroStatus.instance.BaseStatus.AttackSpeed = myHero.Get <int>("AttackSpeed"); HeroStatus.instance.BaseStatus.Exp = myHero.Get <int>("Exp"); HeroStatus.instance.BaseStatus.Crit = myHero.Get <int>("Crit"); HeroStatus.instance.BaseStatus.CritDamage = myHero.Get <int>("CritDamage"); HeroStatus.instance.BaseStatus.Hit = myHero.Get <int>("Hit"); HeroStatus.instance.BaseStatus.Agl = myHero.Get <int>("Agl"); //HeroStatus.instance.use_activeSkillAttack = enemy.use_activeSkillAttack; HeroStatus.instance.BaseStatus.HPRecoverPerSecond = myHero.Get <int>("HPRecoverPerSecond"); HeroStatus.instance.BaseStatus.MPRecoverPerSecond = myHero.Get <int>("MPRecoverPerSecond"); HeroStatus.instance.haveActiveskill = myHero.Get <string>("use_activeSkillAttack"); HeroStatus.instance.haveArmor = myHero.Get <string>("equiped_armor"); HeroStatus.instance.UpdateAttribute(); }); }
public void TestRemoveAllFromList() { AVObject obj = new AVObject("Corgi"); obj["existingList"] = new List<string>() { "gogo", "Queen of Pain" }; obj.RemoveAllFromList("existingList", new List<string>() { "gogo", "missingItem" }); Assert.AreEqual(1, obj.Get<List<object>>("existingList").Count); }
public void getEquipmentStatus(int itemID)//已装备的装备属性 { isEnd = false; if (itemID != 0) { //Debug.Log("aaaa"+itemID); AVQuery <AVObject> equipment = new AVQuery <AVObject>("equipment").WhereEqualTo("id", itemID); //Debug.Log("bbbb" + itemID); equipment.FirstAsync().ContinueWith(t => { //Debug.Log("ddddd" + itemID); AVObject myEquip = t.Result; //Debug.Log("ccccc" + itemID); type = myEquip.Get <string>("equipType").Trim(); //Debug.Log(itemID+"的类型?" + type); //print(type+"111"); //print("Weapon111"); if (type == "Weapon") { //Debug.Log("是武器的有哪些?"+itemID); //Debug.Log(myEquip.Get<string>("name")); Weapon.ID = myEquip.Get <int>("id"); Weapon.Name = myEquip.Get <string>("name"); //Debug.Log(myEquip.Get<string>("name")); Weapon.Type = myEquip.Get <string>("type"); //Debug.Log(myEquip.Get<string>("type")); Weapon.Quality = myEquip.Get <string>("quality"); //Debug.Log(myEquip.Get<string>("quality")); Weapon.Description = myEquip.Get <string>("description"); //Debug.Log(myEquip.Get<string>("description")); Weapon.Capacity = myEquip.Get <int>("capacity"); //Debug.Log(myEquip.Get<int>("capacity")); Weapon.BuyPrice = myEquip.Get <int>("buyPrice"); //Debug.Log(myEquip.Get<int>("buyPrice")); Weapon.SellPrice = myEquip.Get <int>("sellPrice"); //Debug.Log(myEquip.Get<int>("sellPrice")); Weapon.Sprite = myEquip.Get <string>("sprite"); //Debug.Log(myEquip.Get<string>("sprite")); Weapon.HP = myEquip.Get <int>("hp"); //Debug.Log("装备获得了"+Weapon.HP); //Debug.Log(myEquip.Get<string>("name")+"装备获得的hp是"+myEquip.Get<int>("hp")); Weapon.MP = myEquip.Get <int>("mp"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Weapon.S = myEquip.Get <int>("S"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Weapon.P = myEquip.Get <int>("P"); Weapon.D = myEquip.Get <int>("D"); Weapon.A = myEquip.Get <int>("A"); Weapon.I = myEquip.Get <int>("I"); Weapon.AtkValue = myEquip.Get <int>("atkValue"); Weapon.DefValue = myEquip.Get <int>("defValue"); Weapon.AValue = myEquip.Get <int>("aValue"); Weapon.MagicAtk = myEquip.Get <int>("magicAtk"); Weapon.MagicDef = myEquip.Get <int>("magicDef"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的magicDef是" +myEquip.Get<int>("magicDef")); Weapon.Comprehension = myEquip.Get <int>("comprehension"); Weapon.Luck = myEquip.Get <int>("luck"); Weapon.AttackSpeed = myEquip.Get <int>("attackSpeed"); Weapon.stamina = myEquip.Get <int>("stamina"); Weapon.Crit = myEquip.Get <int>("crit"); Weapon.CritDamage = myEquip.Get <int>("critDamage"); Weapon.Hit = myEquip.Get <int>("hit"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的hit是" + myEquip.Get<int>("hit")); Weapon.Agl = myEquip.Get <int>("agl"); Weapon.Counter = myEquip.Get <int>("counter"); Weapon.Double = myEquip.Get <int>("double"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的double是" + myEquip.Get<int>("double")); Weapon.HPRecoverPerSecond = myEquip.Get <int>("hpRecoverPerSecond"); Weapon.MPRecoverPerSecond = myEquip.Get <int>("mpRecoverPerSecond"); Weapon.EquipType = myEquip.Get <string>("equipType"); Weapon.requiredS = myEquip.Get <int>("requiredS"); Weapon.requiredP = myEquip.Get <int>("requiredP"); Weapon.requiredD = myEquip.Get <int>("requiredD"); Weapon.requiredA = myEquip.Get <int>("requiredA"); Weapon.requiredI = myEquip.Get <int>("requiredI"); } else if (type == "Head") { Head.ID = myEquip.Get <int>("id"); Head.Name = myEquip.Get <string>("name"); //Debug.Log(myEquip.Get<string>("name")); Head.Type = myEquip.Get <string>("type"); //Debug.Log(myEquip.Get<string>("type")); Head.Quality = myEquip.Get <string>("quality"); //Debug.Log(myEquip.Get<string>("quality")); Head.Description = myEquip.Get <string>("description"); //Debug.Log(myEquip.Get<string>("description")); Head.Capacity = myEquip.Get <int>("capacity"); //Debug.Log(myEquip.Get<int>("capacity")); Head.BuyPrice = myEquip.Get <int>("buyPrice"); //Debug.Log(myEquip.Get<int>("buyPrice")); Head.SellPrice = myEquip.Get <int>("sellPrice"); //Debug.Log(myEquip.Get<int>("sellPrice")); Head.Sprite = myEquip.Get <string>("sprite"); //Debug.Log(myEquip.Get<string>("sprite")); Head.HP = myEquip.Get <int>("hp"); //Debug.Log("装备获得了"+Head.HP); //Debug.Log(myEquip.Get<string>("name")+"装备获得的hp是"+myEquip.Get<int>("hp")); Head.MP = myEquip.Get <int>("mp"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Head.S = myEquip.Get <int>("S"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Head.P = myEquip.Get <int>("P"); Head.D = myEquip.Get <int>("D"); Head.A = myEquip.Get <int>("A"); Head.I = myEquip.Get <int>("I"); Head.AtkValue = myEquip.Get <int>("atkValue"); Head.DefValue = myEquip.Get <int>("defValue"); Head.AValue = myEquip.Get <int>("aValue"); Head.MagicAtk = myEquip.Get <int>("magicAtk"); Head.MagicDef = myEquip.Get <int>("magicDef"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的magicDef是" +myEquip.Get<int>("magicDef")); Head.Comprehension = myEquip.Get <int>("comprehension"); Head.Luck = myEquip.Get <int>("luck"); Head.AttackSpeed = myEquip.Get <int>("attackSpeed"); Head.stamina = myEquip.Get <int>("stamina"); Head.Crit = myEquip.Get <int>("crit"); Head.CritDamage = myEquip.Get <int>("critDamage"); Head.Hit = myEquip.Get <int>("hit"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的hit是" + myEquip.Get<int>("hit")); Head.Agl = myEquip.Get <int>("agl"); Head.Counter = myEquip.Get <int>("counter"); Head.Double = myEquip.Get <int>("double"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的double是" + myEquip.Get<int>("double")); Head.HPRecoverPerSecond = myEquip.Get <int>("hpRecoverPerSecond"); Head.MPRecoverPerSecond = myEquip.Get <int>("mpRecoverPerSecond"); Head.EquipType = myEquip.Get <string>("equipType"); Head.requiredS = myEquip.Get <int>("requiredS"); Head.requiredP = myEquip.Get <int>("requiredP"); Head.requiredD = myEquip.Get <int>("requiredD"); Head.requiredA = myEquip.Get <int>("requiredA"); Head.requiredI = myEquip.Get <int>("requiredI"); } else if (type == "Chest") { Chest.ID = myEquip.Get <int>("id"); Chest.Name = myEquip.Get <string>("name"); //Debug.Log(myEquip.Get<string>("name")); Chest.Type = myEquip.Get <string>("type"); //Debug.Log(myEquip.Get<string>("type")); Chest.Quality = myEquip.Get <string>("quality"); //Debug.Log(myEquip.Get<string>("quality")); Chest.Description = myEquip.Get <string>("description"); //Debug.Log(myEquip.Get<string>("description")); Chest.Capacity = myEquip.Get <int>("capacity"); //Debug.Log(myEquip.Get<int>("capacity")); Chest.BuyPrice = myEquip.Get <int>("buyPrice"); //Debug.Log(myEquip.Get<int>("buyPrice")); Chest.SellPrice = myEquip.Get <int>("sellPrice"); //Debug.Log(myEquip.Get<int>("sellPrice")); Chest.Sprite = myEquip.Get <string>("sprite"); //Debug.Log(myEquip.Get<string>("sprite")); Chest.HP = myEquip.Get <int>("hp"); //Debug.Log("装备获得了"+Chest.HP); //Debug.Log(myEquip.Get<string>("name")+"装备获得的hp是"+myEquip.Get<int>("hp")); Chest.MP = myEquip.Get <int>("mp"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Chest.S = myEquip.Get <int>("S"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Chest.P = myEquip.Get <int>("P"); Chest.D = myEquip.Get <int>("D"); Chest.A = myEquip.Get <int>("A"); Chest.I = myEquip.Get <int>("I"); Chest.AtkValue = myEquip.Get <int>("atkValue"); Chest.DefValue = myEquip.Get <int>("defValue"); Chest.AValue = myEquip.Get <int>("aValue"); Chest.MagicAtk = myEquip.Get <int>("magicAtk"); Chest.MagicDef = myEquip.Get <int>("magicDef"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的magicDef是" +myEquip.Get<int>("magicDef")); Chest.Comprehension = myEquip.Get <int>("comprehension"); Chest.Luck = myEquip.Get <int>("luck"); Chest.AttackSpeed = myEquip.Get <int>("attackSpeed"); Chest.stamina = myEquip.Get <int>("stamina"); Chest.Crit = myEquip.Get <int>("crit"); Chest.CritDamage = myEquip.Get <int>("critDamage"); Chest.Hit = myEquip.Get <int>("hit"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的hit是" + myEquip.Get<int>("hit")); Chest.Agl = myEquip.Get <int>("agl"); Chest.Counter = myEquip.Get <int>("counter"); Chest.Double = myEquip.Get <int>("double"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的double是" + myEquip.Get<int>("double")); Chest.HPRecoverPerSecond = myEquip.Get <int>("hpRecoverPerSecond"); Chest.MPRecoverPerSecond = myEquip.Get <int>("mpRecoverPerSecond"); Chest.EquipType = myEquip.Get <string>("equipType"); Chest.requiredS = myEquip.Get <int>("requiredS"); Chest.requiredP = myEquip.Get <int>("requiredP"); Chest.requiredD = myEquip.Get <int>("requiredD"); Chest.requiredA = myEquip.Get <int>("requiredA"); Chest.requiredI = myEquip.Get <int>("requiredI"); } else if (type == "Leg") { Leg.ID = myEquip.Get <int>("id"); Leg.Name = myEquip.Get <string>("name"); //Debug.Log(myEquip.Get<string>("name")); Leg.Type = myEquip.Get <string>("type"); //Debug.Log(myEquip.Get<string>("type")); Leg.Quality = myEquip.Get <string>("quality"); //Debug.Log(myEquip.Get<string>("quality")); Leg.Description = myEquip.Get <string>("description"); //Debug.Log(myEquip.Get<string>("description")); Leg.Capacity = myEquip.Get <int>("capacity"); //Debug.Log(myEquip.Get<int>("capacity")); Leg.BuyPrice = myEquip.Get <int>("buyPrice"); //Debug.Log(myEquip.Get<int>("buyPrice")); Leg.SellPrice = myEquip.Get <int>("sellPrice"); //Debug.Log(myEquip.Get<int>("sellPrice")); Leg.Sprite = myEquip.Get <string>("sprite"); //Debug.Log(myEquip.Get<string>("sprite")); Leg.HP = myEquip.Get <int>("hp"); //Debug.Log("装备获得了"+Leg.HP); //Debug.Log(myEquip.Get<string>("name")+"装备获得的hp是"+myEquip.Get<int>("hp")); Leg.MP = myEquip.Get <int>("mp"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Leg.S = myEquip.Get <int>("S"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Leg.P = myEquip.Get <int>("P"); Leg.D = myEquip.Get <int>("D"); Leg.A = myEquip.Get <int>("A"); Leg.I = myEquip.Get <int>("I"); Leg.AtkValue = myEquip.Get <int>("atkValue"); Leg.DefValue = myEquip.Get <int>("defValue"); Leg.AValue = myEquip.Get <int>("aValue"); Leg.MagicAtk = myEquip.Get <int>("magicAtk"); Leg.MagicDef = myEquip.Get <int>("magicDef"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的magicDef是" +myEquip.Get<int>("magicDef")); Leg.Comprehension = myEquip.Get <int>("comprehension"); Leg.Luck = myEquip.Get <int>("luck"); Leg.AttackSpeed = myEquip.Get <int>("attackSpeed"); Leg.stamina = myEquip.Get <int>("stamina"); Leg.Crit = myEquip.Get <int>("crit"); Leg.CritDamage = myEquip.Get <int>("critDamage"); Leg.Hit = myEquip.Get <int>("hit"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的hit是" + myEquip.Get<int>("hit")); Leg.Agl = myEquip.Get <int>("agl"); Leg.Counter = myEquip.Get <int>("counter"); Leg.Double = myEquip.Get <int>("double"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的double是" + myEquip.Get<int>("double")); Leg.HPRecoverPerSecond = myEquip.Get <int>("hpRecoverPerSecond"); Leg.MPRecoverPerSecond = myEquip.Get <int>("mpRecoverPerSecond"); Leg.EquipType = myEquip.Get <string>("equipType"); Leg.requiredS = myEquip.Get <int>("requiredS"); Leg.requiredP = myEquip.Get <int>("requiredP"); Leg.requiredD = myEquip.Get <int>("requiredD"); Leg.requiredA = myEquip.Get <int>("requiredA"); Leg.requiredI = myEquip.Get <int>("requiredI"); } else if (type == "Ring") { Ring.ID = myEquip.Get <int>("id"); Ring.Name = myEquip.Get <string>("name"); //Debug.Log(myEquip.Get<string>("name")); Ring.Type = myEquip.Get <string>("type"); //Debug.Log(myEquip.Get<string>("type")); Ring.Quality = myEquip.Get <string>("quality"); //Debug.Log(myEquip.Get<string>("quality")); Ring.Description = myEquip.Get <string>("description"); //Debug.Log(myEquip.Get<string>("description")); Ring.Capacity = myEquip.Get <int>("capacity"); //Debug.Log(myEquip.Get<int>("capacity")); Ring.BuyPrice = myEquip.Get <int>("buyPrice"); //Debug.Log(myEquip.Get<int>("buyPrice")); Ring.SellPrice = myEquip.Get <int>("sellPrice"); //Debug.Log(myEquip.Get<int>("sellPrice")); Ring.Sprite = myEquip.Get <string>("sprite"); //Debug.Log(myEquip.Get<string>("sprite")); Ring.HP = myEquip.Get <int>("hp"); //Debug.Log("装备获得了"+Ring.HP); //Debug.Log(myEquip.Get<string>("name")+"装备获得的hp是"+myEquip.Get<int>("hp")); Ring.MP = myEquip.Get <int>("mp"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Ring.S = myEquip.Get <int>("S"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的mp是" +myEquip.Get<int>("mp")); Ring.P = myEquip.Get <int>("P"); Ring.D = myEquip.Get <int>("D"); Ring.A = myEquip.Get <int>("A"); Ring.I = myEquip.Get <int>("I"); Ring.AtkValue = myEquip.Get <int>("atkValue"); Ring.DefValue = myEquip.Get <int>("defValue"); Ring.AValue = myEquip.Get <int>("aValue"); Ring.MagicAtk = myEquip.Get <int>("magicAtk"); Ring.MagicDef = myEquip.Get <int>("magicDef"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的magicDef是" +myEquip.Get<int>("magicDef")); Ring.Comprehension = myEquip.Get <int>("comprehension"); Ring.Luck = myEquip.Get <int>("luck"); Ring.AttackSpeed = myEquip.Get <int>("attackSpeed"); Ring.stamina = myEquip.Get <int>("stamina"); Ring.Crit = myEquip.Get <int>("crit"); Ring.CritDamage = myEquip.Get <int>("critDamage"); Ring.Hit = myEquip.Get <int>("hit"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的hit是" + myEquip.Get<int>("hit")); Ring.Agl = myEquip.Get <int>("agl"); Ring.Counter = myEquip.Get <int>("counter"); Ring.Double = myEquip.Get <int>("double"); //Debug.Log(myEquip.Get<string>("name") + "装备获得的double是" + myEquip.Get<int>("double")); Ring.HPRecoverPerSecond = myEquip.Get <int>("hpRecoverPerSecond"); Ring.MPRecoverPerSecond = myEquip.Get <int>("mpRecoverPerSecond"); Ring.EquipType = myEquip.Get <string>("equipType"); Ring.requiredS = myEquip.Get <int>("requiredS"); Ring.requiredP = myEquip.Get <int>("requiredP"); Ring.requiredD = myEquip.Get <int>("requiredD"); Ring.requiredA = myEquip.Get <int>("requiredA"); Ring.requiredI = myEquip.Get <int>("requiredI"); } else { Debug.Log("!!!!!!!!1"); } isEnd = true; //Debug.Log("3333333333"+isEnd); //Debug.Log(myEquip.Get<string>("name")); }); } }