فهرست منبع

皮肤购买bug修复

sa 6 سال پیش
والد
کامیت
355078b4b6
2فایلهای تغییر یافته به همراه51 افزوده شده و 50 حذف شده
  1. 2 2
      assets/Scene/GameSence.fire
  2. 49 48
      assets/Script/Home/HomeSence.js

+ 2 - 2
assets/Scene/GameSence.fire

@@ -14889,7 +14889,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 131.6,
+      "width": 0,
       "height": 45.6
     },
     "_rotationX": 0,
@@ -14926,7 +14926,7 @@
     },
     "_isSystemFontUsed": false,
     "_spacingX": -2,
-    "_N$string": "9999",
+    "_N$string": "",
     "_N$horizontalAlign": 1,
     "_N$verticalAlign": 1,
     "_N$fontFamily": "Arial",

+ 49 - 48
assets/Script/Home/HomeSence.js

@@ -262,54 +262,55 @@ cc.Class({
         var condition2 = skinNode.getChildByName("Condition2");
         var lockerSp = skinNode.getChildByName("LockerSp");
         var playBtn = skinNode.getChildByName("PlayBtn");
-        var unlockSp = skinNode.getChildByName("UnlockSp");
-        if (this.skinIndex > 0) {
-            if (cfg.skinCondition[this.skinIndex].scoreType == 0) {
-                var historyScore = UserInfo.getHistoryScore();
-                if (historyScore >= cfg.skinCondition[this.skinIndex].score) {
-                    condition1.active = false;
-                    condition2.active = false;
-                    unlockSp.active = true;
-                    lockerSp.active = false;
-                    playBtn.active = true;
-                } else {
-                    condition1.active = true;
-                    condition2.active = false;
-                    unlockSp.active = false;
-                    lockerSp.active = true;
-                    playBtn.active = false;
-
-                    condition1.getChildByName("ConditionLabel").getComponent("cc.Label").string = historyScore + "." + cfg.skinCondition[this.skinIndex].score;
-                }
-
-            } else if (cfg.skinCondition[this.skinIndex].scoreType == 1) {
-                var sumScore = UserInfo.getTotalGold();
-                if (sumScore >= cfg.skinCondition[this.skinIndex].score) {
-                    condition1.active = false;
-                    condition2.active = false;
-                    unlockSp.active = true;
-                    lockerSp.active = false;
-                    playBtn.active = true;
-                } else {
-                    condition1.active = false;
-                    condition2.active = true;
-                    unlockSp.active = false;
-                    lockerSp.active = true;
-                    playBtn.active = false;
-
-                    condition2.getChildByName("ConditionLabel").getComponent("cc.Label").string = cfg.skinCondition[this.skinIndex].score;
-                }
-            }
-        } else {
-            condition1.active = false;
-            condition2.active = false;
-            lockerSp.active = false;
-            playBtn.active = true;
-            unlockSp.active = true;
-        }
-
-
-        //})
+		var unlockSp = skinNode.getChildByName("UnlockSp");
+
+		UserInfo.getUserGameData((data) => {
+			var historyScore = data.maxScore || UserInfo.getItem('score');
+
+			if (this.skinIndex > 0) {
+				if (cfg.skinCondition[this.skinIndex].scoreType == 0) {
+					if (historyScore >= cfg.skinCondition[this.skinIndex].score) {
+						condition1.active = false;
+						condition2.active = false;
+						unlockSp.active = true;
+						lockerSp.active = false;
+						playBtn.active = true;
+					} else {
+						condition1.active = true;
+						condition2.active = false;
+						unlockSp.active = false;
+						lockerSp.active = true;
+						playBtn.active = false;
+	
+						condition1.getChildByName("ConditionLabel").getComponent("cc.Label").string = historyScore + "." + cfg.skinCondition[this.skinIndex].score;
+					}
+	
+				} else if (cfg.skinCondition[this.skinIndex].scoreType == 1) {
+					var sumScore = UserInfo.getTotalGold();
+					if (sumScore >= cfg.skinCondition[this.skinIndex].score) {
+						condition1.active = false;
+						condition2.active = false;
+						unlockSp.active = true;
+						lockerSp.active = false;
+						playBtn.active = true;
+					} else {
+						condition1.active = false;
+						condition2.active = true;
+						unlockSp.active = false;
+						lockerSp.active = true;
+						playBtn.active = false;
+	
+						condition2.getChildByName("ConditionLabel").getComponent("cc.Label").string = cfg.skinCondition[this.skinIndex].score;
+					}
+				}
+			} else {
+				condition1.active = false;
+				condition2.active = false;
+				lockerSp.active = false;
+				playBtn.active = true;
+				unlockSp.active = true;
+			}
+		})
     },
 
     onGuideBtn: function (event) {