Commit 74b8e1f0 authored by haiyoucuv's avatar haiyoucuv

init

parent 1b87129c
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"__id__": 42 "__id__": 42
}, },
{ {
"__id__": 52 "__id__": 54
}, },
{ {
"__id__": 64 "__id__": 64
...@@ -1027,7 +1027,7 @@ ...@@ -1027,7 +1027,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "goBuy", "_name": "goDress",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
...@@ -1047,10 +1047,13 @@ ...@@ -1047,10 +1047,13 @@
}, },
{ {
"__id__": 49 "__id__": 49
},
{
"__id__": 51
} }
], ],
"_prefab": { "_prefab": {
"__id__": 51 "__id__": 53
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
...@@ -1107,7 +1110,7 @@ ...@@ -1107,7 +1110,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "e7y42+PUJJ/IhcaB4TrN4E" "fileId": "56z3zcs6lCkJcg+aERDCzx"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -1132,7 +1135,7 @@ ...@@ -1132,7 +1135,7 @@
"a": 255 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "2c350a45-e5e6-49a9-830a-0386c65cd1b2@f9941", "__uuid__": "7b116923-fcdd-40cd-9900-dd4a4ef20290@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 0, "_type": 0,
...@@ -1152,7 +1155,7 @@ ...@@ -1152,7 +1155,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "e63Ukc38RNHoqWCB9VolX1" "fileId": "0eFWhA+RdGibyxijhB5y9p"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
...@@ -1188,10 +1191,10 @@ ...@@ -1188,10 +1191,10 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "c8ZpXn4IpPb48xFw3GyPpJ" "fileId": "dezkaLjB5IoY4Ma72sIc3x"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Widget",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
...@@ -1202,6 +1205,42 @@ ...@@ -1202,6 +1205,42 @@
"__prefab": { "__prefab": {
"__id__": 50 "__id__": 50
}, },
"_alignFlags": 0,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "078spIlsVKEZt41vYhXAqu"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 42
},
"_enabled": true,
"__prefab": {
"__id__": 52
},
"clickEvents": [], "clickEvents": [],
"_interactable": true, "_interactable": true,
"_transition": 3, "_transition": 3,
...@@ -1244,7 +1283,7 @@ ...@@ -1244,7 +1283,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "4eWKWHDLxE4qTlEWaZ1Skp" "fileId": "45sDkyWWhOip/VJ/lHrQHP"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
...@@ -1254,14 +1293,14 @@ ...@@ -1254,14 +1293,14 @@
"asset": { "asset": {
"__id__": 0 "__id__": 0
}, },
"fileId": "ecVvn68FpFsq+J+g6BlPar", "fileId": "63AO0HoqtJx5lqi/tpLkwI",
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "goDress", "_name": "Derssed",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
...@@ -1270,9 +1309,6 @@ ...@@ -1270,9 +1309,6 @@
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 53
},
{ {
"__id__": 55 "__id__": 55
}, },
...@@ -1324,11 +1360,11 @@ ...@@ -1324,11 +1360,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 52 "__id__": 54
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 54 "__id__": 56
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
...@@ -1344,7 +1380,7 @@ ...@@ -1344,7 +1380,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "56z3zcs6lCkJcg+aERDCzx" "fileId": "50BByHlFhAYqfwwsWGEJiJ"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -1352,11 +1388,11 @@ ...@@ -1352,11 +1388,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 52 "__id__": 54
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 56 "__id__": 58
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
...@@ -1369,7 +1405,7 @@ ...@@ -1369,7 +1405,7 @@
"a": 255 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "7b116923-fcdd-40cd-9900-dd4a4ef20290@f9941", "__uuid__": "c5adb6d5-172c-4a84-9d2f-79a79f87414a@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 0, "_type": 0,
...@@ -1389,7 +1425,7 @@ ...@@ -1389,7 +1425,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "0eFWhA+RdGibyxijhB5y9p" "fileId": "e167c/SxRLKZerqSTD0Ly0"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
...@@ -1397,11 +1433,11 @@ ...@@ -1397,11 +1433,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 52 "__id__": 54
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 58 "__id__": 60
}, },
"_alignFlags": 34, "_alignFlags": 34,
"_target": null, "_target": null,
...@@ -1425,43 +1461,7 @@ ...@@ -1425,43 +1461,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "dezkaLjB5IoY4Ma72sIc3x" "fileId": "e4KLGq3fFJlIYTBUUy0sLu"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 52
},
"_enabled": true,
"__prefab": {
"__id__": 60
},
"_alignFlags": 0,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "078spIlsVKEZt41vYhXAqu"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Button",
...@@ -1469,7 +1469,7 @@ ...@@ -1469,7 +1469,7 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 52 "__id__": 54
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
...@@ -1517,7 +1517,7 @@ ...@@ -1517,7 +1517,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "45sDkyWWhOip/VJ/lHrQHP" "fileId": "eciQvv6OtBZrvtYZSfijMy"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
...@@ -1527,14 +1527,14 @@ ...@@ -1527,14 +1527,14 @@
"asset": { "asset": {
"__id__": 0 "__id__": 0
}, },
"fileId": "63AO0HoqtJx5lqi/tpLkwI", "fileId": "73UVCtipJDB7Sq4XaCRLcY",
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Derssed", "_name": "goBuy",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
...@@ -1614,7 +1614,7 @@ ...@@ -1614,7 +1614,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "50BByHlFhAYqfwwsWGEJiJ" "fileId": "e7y42+PUJJ/IhcaB4TrN4E"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -1639,7 +1639,7 @@ ...@@ -1639,7 +1639,7 @@
"a": 255 "a": 255
}, },
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "c5adb6d5-172c-4a84-9d2f-79a79f87414a@f9941", "__uuid__": "2c350a45-e5e6-49a9-830a-0386c65cd1b2@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 0, "_type": 0,
...@@ -1659,7 +1659,7 @@ ...@@ -1659,7 +1659,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "e167c/SxRLKZerqSTD0Ly0" "fileId": "e63Ukc38RNHoqWCB9VolX1"
}, },
{ {
"__type__": "cc.Widget", "__type__": "cc.Widget",
...@@ -1695,7 +1695,7 @@ ...@@ -1695,7 +1695,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "e4KLGq3fFJlIYTBUUy0sLu" "fileId": "c8ZpXn4IpPb48xFw3GyPpJ"
}, },
{ {
"__type__": "cc.Button", "__type__": "cc.Button",
...@@ -1751,7 +1751,7 @@ ...@@ -1751,7 +1751,7 @@
}, },
{ {
"__type__": "cc.CompPrefabInfo", "__type__": "cc.CompPrefabInfo",
"fileId": "eciQvv6OtBZrvtYZSfijMy" "fileId": "4eWKWHDLxE4qTlEWaZ1Skp"
}, },
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
...@@ -1761,7 +1761,7 @@ ...@@ -1761,7 +1761,7 @@
"asset": { "asset": {
"__id__": 0 "__id__": 0
}, },
"fileId": "73UVCtipJDB7Sq4XaCRLcY", "fileId": "ecVvn68FpFsq+J+g6BlPar",
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
...@@ -1858,7 +1858,7 @@ ...@@ -1858,7 +1858,7 @@
{ {
"__type__": "SkinNode", "__type__": "SkinNode",
"node": { "node": {
"__id__": 42 "__id__": 64
}, },
"type": 0, "type": 0,
"color1": { "color1": {
...@@ -1880,7 +1880,7 @@ ...@@ -1880,7 +1880,7 @@
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"skin2": { "skin2": {
"__uuid__": "3802228e-9e2f-4e1a-98a3-c0146817751a@f9941", "__uuid__": "13efdb8b-16ac-4686-855e-10f39455ff2f@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"node1": null, "node1": null,
...@@ -1889,7 +1889,7 @@ ...@@ -1889,7 +1889,7 @@
{ {
"__type__": "SkinNode", "__type__": "SkinNode",
"node": { "node": {
"__id__": 52 "__id__": 42
}, },
"type": 0, "type": 0,
"color1": { "color1": {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"ver": "1.0.27", "ver": "1.0.27",
"importer": "image", "importer": "image",
"imported": true, "imported": true,
"uuid": "3802228e-9e2f-4e1a-98a3-c0146817751a", "uuid": "13efdb8b-16ac-4686-855e-10f39455ff2f",
"files": [ "files": [
".json", ".json",
".png" ".png"
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
"subMetas": { "subMetas": {
"6c48a": { "6c48a": {
"importer": "texture", "importer": "texture",
"uuid": "3802228e-9e2f-4e1a-98a3-c0146817751a@6c48a", "uuid": "13efdb8b-16ac-4686-855e-10f39455ff2f@6c48a",
"displayName": "继续购买", "displayName": "黄前往兑换",
"id": "6c48a", "id": "6c48a",
"name": "texture", "name": "texture",
"userData": { "userData": {
"wrapModeS": "clamp-to-edge", "wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge", "wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "3802228e-9e2f-4e1a-98a3-c0146817751a", "imageUuidOrDatabaseUri": "13efdb8b-16ac-4686-855e-10f39455ff2f",
"isUuid": true, "isUuid": true,
"visible": false, "visible": false,
"minfilter": "linear", "minfilter": "linear",
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
}, },
"f9941": { "f9941": {
"importer": "sprite-frame", "importer": "sprite-frame",
"uuid": "3802228e-9e2f-4e1a-98a3-c0146817751a@f9941", "uuid": "13efdb8b-16ac-4686-855e-10f39455ff2f@f9941",
"displayName": "继续购买", "displayName": "黄前往兑换",
"id": "f9941", "id": "f9941",
"name": "spriteFrame", "name": "spriteFrame",
"userData": { "userData": {
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
] ]
}, },
"isUuid": true, "isUuid": true,
"imageUuidOrDatabaseUri": "3802228e-9e2f-4e1a-98a3-c0146817751a@6c48a", "imageUuidOrDatabaseUri": "13efdb8b-16ac-4686-855e-10f39455ff2f@6c48a",
"atlasUuid": "" "atlasUuid": ""
}, },
"ver": "1.0.12", "ver": "1.0.12",
...@@ -129,6 +129,6 @@ ...@@ -129,6 +129,6 @@
"type": "sprite-frame", "type": "sprite-frame",
"hasAlpha": true, "hasAlpha": true,
"fixAlphaTransparencyArtifacts": false, "fixAlphaTransparencyArtifacts": false,
"redirect": "3802228e-9e2f-4e1a-98a3-c0146817751a@6c48a" "redirect": "13efdb8b-16ac-4686-855e-10f39455ff2f@6c48a"
} }
} }
This diff is collapsed.
...@@ -33,7 +33,8 @@ export default class ProPop extends Panel { ...@@ -33,7 +33,8 @@ export default class ProPop extends Panel {
} }
set buyNum(val) { set buyNum(val) {
val = math.clamp(1, 99, val); const max = Math.min(~~(store.exchangeInfo.remainCredits / +this.data.consumeCreditsNum), 99);
val = math.clamp(1, max, val);
this._buyNum = val; this._buyNum = val;
this.numTxt.string = `${val}`; this.numTxt.string = `${val}`;
this.num.string = `${(+this.data.consumeCreditsNum) * val}`; this.num.string = `${(+this.data.consumeCreditsNum) * val}`;
...@@ -42,8 +43,13 @@ export default class ProPop extends Panel { ...@@ -42,8 +43,13 @@ export default class ProPop extends Panel {
onLoad() { onLoad() {
this.closeBtn.on(Button.EventType.CLICK, this.clickClose); this.closeBtn.on(Button.EventType.CLICK, this.clickClose);
this.btn.on(Button.EventType.CLICK, this.clickExchange); this.btn.on(Button.EventType.CLICK, this.clickExchange);
this.add.on(Button.EventType.CLICK, this.clickAdd); this.add.on(Node.EventType.TOUCH_START, this.startAdd);
this.sub.on(Button.EventType.CLICK, this.clickSub); this.add.on(Node.EventType.TOUCH_END, this.endAdd);
this.add.on(Node.EventType.TOUCH_CANCEL, this.endAdd);
this.sub.on(Node.EventType.TOUCH_START, this.startSub);
this.sub.on(Node.EventType.TOUCH_END, this.endSub);
this.sub.on(Node.EventType.TOUCH_CANCEL, this.endSub);
} }
start() { start() {
...@@ -68,14 +74,32 @@ export default class ProPop extends Panel { ...@@ -68,14 +74,32 @@ export default class ProPop extends Panel {
this.prizeName.string = optionName; this.prizeName.string = optionName;
} }
clickAdd = () => { startAdd = () => {
this.buyNum++;
this.schedule(this.scheduleAdd, 0.05, 100, 1);
};
scheduleAdd = () => {
this.buyNum++; this.buyNum++;
}
endAdd = () => {
this.unschedule(this.scheduleAdd);
}; };
clickSub = () => { startSub = () => {
this.buyNum--; this.buyNum--;
this.schedule(this.scheduleSub, 0.05, 100, 1);
}; };
scheduleSub = () => {
this.buyNum--;
}
endSub = () => {
this.unschedule(this.scheduleSub);
}
clickClose = () => { clickClose = () => {
this.hidePanel(); this.hidePanel();
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"message": "eu in", "message": "eu in",
"code": "enim", "code": "enim",
"data": { "data": {
"remainCredits": 123, "remainCredits": 20000,
"exchangeShopList": [ "exchangeShopList": [
{ {
"id": "id1", "id": "id1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment