Commit 6331f693 authored by wildfirecode's avatar wildfirecode

1

parent 884f7178
No preview for this file type
{"currentScene":"assets/prefabs/i1.pfb"} {"currentScene":"assets/prefabs/rankItem.pfb"}
\ No newline at end of file \ No newline at end of file
{
"name": "rankItem",
"root": {
"uuid": "20190301114308",
"components": [
{
"script": "components/base/Transform"
},
{
"script": "components/other/CameraController"
}
],
"children": [
{
"uuid": "20190301114245",
"name": "rankItem",
"components": [
{
"script": "components/base/Transform",
"properties": {}
}
],
"children": [
{
"name": "rankTxt",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "1",
"fillColor": "rgba(255, 247, 224, 1)"
}
}
],
"uuid": "723b6f9f-ed88-4e03-ae63-9b5efc3990c6"
}
]
}
]
}
}
\ No newline at end of file
{"ver":"1.0.1","uuid":"681aaec9-4063-4399-b56f-2a88de1a902e","subMetas":{},"type":"prefab"}
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 288.010101010101, "x": 288.010101010101,
"y": -671.2575757575759, "y": -680.1464646464648,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 288.010101010101, "x": 288.010101010101,
"y": -731.8636363636363, "y": -742.9747474747473,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -309,15 +309,15 @@ ...@@ -309,15 +309,15 @@
"uuid": "47299b0c-16e5-4ef6-8d9b-5b6b6ad1077d" "uuid": "47299b0c-16e5-4ef6-8d9b-5b6b6ad1077d"
}, },
{ {
"name": "rankBtn", "name": "startBtn",
"components": [ "components": [
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": { "properties": {
"position": { "position": {
"x": 0, "_hashCode": 2827,
"y": 245.1060606060605, "_x": 0,
"_type_": "scilla/support/Vector2D" "_y": 245.1060606060605
} }
} }
}, },
...@@ -353,15 +353,15 @@ ...@@ -353,15 +353,15 @@
"uuid": "5f3ed06e-c47a-491e-a3a1-9ac0e700a302" "uuid": "5f3ed06e-c47a-491e-a3a1-9ac0e700a302"
}, },
{ {
"name": "startBtn", "name": "rankBtn",
"components": [ "components": [
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": { "properties": {
"position": { "position": {
"x": 0, "_hashCode": 3405,
"y": 299.651515151515, "_x": 0,
"_type_": "scilla/support/Vector2D" "_y": 299.651515151515
} }
} }
}, },
...@@ -383,8 +383,8 @@ ...@@ -383,8 +383,8 @@
"onClick": [ "onClick": [
{ {
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c", "entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": null, "component": 1,
"method": null "method": "onClick_rankbtn"
} }
], ],
"disabledRes": "res|66066ff4-4536-4398-84ad-8cf91c2d8333", "disabledRes": "res|66066ff4-4536-4398-84ad-8cf91c2d8333",
...@@ -663,31 +663,683 @@ ...@@ -663,31 +663,683 @@
"components": [ "components": [
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": {} "properties": {
"position": {
"_hashCode": 2197,
"_x": 0,
"_y": 0
}
}
}, },
{ {
"script": "./scripts/scenes/SceneResult", "script": "./scripts/scenes/SceneResult",
"properties": {} "properties": {
"avatar": "entity|61c74585-ab3c-4297-90ba-0dde2ba89b9f"
}
} }
], ],
"uuid": "5f2a7508-4728-430b-b306-06f719ea81e3", "uuid": "5f2a7508-4728-430b-b306-06f719ea81e3",
"disabled": true, "disabled": true,
"children": [ "children": [
{ {
"name": "Label", "name": "cankao",
"components": [ "components": [
{ {
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": {} "properties": {}
}, },
{ {
"script": "components/renderer/TextRenderer", "script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8b7f9aab-a69b-4bff-99b7-f3710d565403"
}
}
],
"uuid": "28f8ab52-4eaa-48c0-a2a6-05d6200f596f"
},
{
"name": "bg",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|6c90daea-7dde-4b18-823a-e4f8141b7b41"
}
}
],
"uuid": "e847879d-0105-4293-8475-7bd5f1623f78",
"disabled": true
},
{
"name": "imgWrapper1",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 1.4726450020567654,
"y": -589.7079391197037
}
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"width": 78,
"cornerRadius": 39,
"height": 78,
"maskVisible": false,
"isMask": true
}
}
],
"uuid": "61c74585-ab3c-4297-90ba-0dde2ba89b9f",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"scale": {
"x": 1,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8ad59445-0ff2-4382-bb1c-9f7a07845e48"
}
}
],
"uuid": "5e84cf5c-3eb5-487b-a4ac-64ee28afc84a",
"children": []
}
],
"disabled": false
},
{
"name": "myImgWrapper",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -154.89099136157958,
"y": 246.65569724393254
}
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"width": 78,
"cornerRadius": 39,
"height": 78,
"maskVisible": false,
"isMask": true
}
}
],
"uuid": "89f3d124-9551-4fba-a0e9-fda2d333bba3",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"scale": {
"x": 1,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8ad59445-0ff2-4382-bb1c-9f7a07845e48"
}
}
],
"uuid": "71ec7386-f1d9-4d50-9c47-2b1b3c205b0d",
"children": []
}
],
"disabled": false
},
{
"name": "imgWrapper2",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -199.062114356232,
"y": -561.6865487453723
}
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"width": 64,
"cornerRadius": 32,
"height": 64,
"maskVisible": false,
"isMask": true
}
}
],
"uuid": "af30c398-63ea-4d46-b2b8-3581658c4b97",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"scale": {
"x": 1,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8ad59445-0ff2-4382-bb1c-9f7a07845e48"
}
}
],
"uuid": "b5a4ca1f-578a-4e3c-b7ea-ad7bd502a114",
"children": []
}
],
"disabled": false
},
{
"name": "imgWrapper3",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 190.7774578362814,
"y": -561.6865487453723
}
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"width": 64,
"cornerRadius": 32,
"height": 64,
"maskVisible": false,
"isMask": true
}
}
],
"uuid": "eca1b7fe-52fa-4f86-8148-7fcada11e673",
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {
"scale": {
"x": 1,
"_type_": "scilla/support/Vector2D"
},
"position": {
"x": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|8ad59445-0ff2-4382-bb1c-9f7a07845e48"
}
}
],
"uuid": "4ce9e059-524d-40ac-a437-fed2e15308d7",
"children": []
}
],
"disabled": false
},
{
"name": "rankpic1",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0.7486631016043077,
"y": -553.6898395721925
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|598c0eb5-ea0e-41dc-adcb-d808fe0ac95f"
}
}
],
"uuid": "f4bd7046-52f2-479c-afc4-9cbd1305d4dd"
},
{
"name": "rankpic2",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -200.10695187165777,
"y": -524.2780748663101
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|cf2931eb-bd7a-4ef6-8b71-9b67dc633306"
}
}
],
"uuid": "fb02ba39-5469-441a-934f-b3cf7b401822"
},
{
"name": "rankpic3",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 192,
"y": -524.4102564102565
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|d6139441-67ce-4290-94b4-43971b310753"
}
}
],
"uuid": "0efb4a08-ac0f-40bc-9b54-02799cf730dd",
"children": []
},
{
"name": "name2",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -207.05882352941177,
"y": -481.1764705882353
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(251, 215, 106, 1)",
"text": "易烊千玺",
"textStyle": {
"fontSize": 22
}
}
}
],
"uuid": "108b063c-3442-4eec-b211-5e89f7e3d5eb"
},
{
"name": "name1",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": -487.05882352941177
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(251, 215, 106, 1)",
"text": "易烊千玺",
"textStyle": {
"fontSize": 22
}
}
}
],
"uuid": "a75e1f38-8c14-4f51-88e8-aa8cb8cd9f10"
},
{
"name": "name3",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 202.3529411764706,
"y": -480
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(251, 215, 106, 1)",
"text": "易烊千玺",
"textStyle": {
"fontSize": 22
}
}
}
],
"uuid": "73b97462-7a7f-4801-916a-34ec161b6910"
},
{
"name": "myname",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -35.82887700534755,
"y": 245.45454545454544
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(255, 255, 255, 1)",
"text": "易烊千玺",
"textStyle": {
"fontSize": 25
}
}
}
],
"uuid": "61fc871c-9f18-499e-abb5-2dfe8b381223"
},
{
"name": "myscore",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 264.17112299465253,
"y": 243.63636363636363
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(255, 255, 255, 1)",
"text": "135颗",
"textStyle": {
"fontSize": 25
},
"textAlign": "center"
}
}
],
"uuid": "d30c7a2a-e95a-42e4-a288-ebe7022e1f3e"
},
{
"name": "score2",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -207.05882352941177,
"y": -456.4705882352941
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(251, 215, 106, 1)",
"text": "109",
"textStyle": {
"fontSize": 25
}
}
}
],
"uuid": "6a1c76cf-a939-4c38-b14b-897f8f4b4180"
},
{
"name": "score1",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": -456.4705882352941
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(251, 215, 106, 1)",
"text": "109",
"textStyle": {
"fontSize": 25
}
}
}
],
"uuid": "b9000662-9059-4983-a2da-517555dfda1f"
},
{
"name": "score3",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 203.5294117647059,
"y": -456.4705882352941
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(251, 215, 106, 1)",
"text": "109",
"textStyle": {
"fontSize": 25
}
}
}
],
"uuid": "1a35431a-c2ab-494e-baa9-8b4e1f1e7c16"
},
{
"name": "ScrollView",
"components": [
{
"script": "components/base/Transform",
"properties": {
"width": 692,
"height": 511,
"position": {
"x": -1.8181818181819318,
"y": -149.09090909090912
},
"alpha": 0.5
}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(255, 255, 255, 0.7)",
"cornerRadius": 20
},
"disabled": false
},
{
"script": "components/ui/ScrollView",
"properties": { "properties": {
"text": "result" "viewport": "entity|16e8244f-380c-480c-8175-da3c8cda6223",
"content": "entity|f66d93c5-5fee-4c7b-b29c-8af633cae769",
"lockingType": 1
} }
} }
], ],
"uuid": "0635f050-44bd-48a5-86f0-8df37f11063f" "uuid": "49c19e54-83a0-463c-a396-0ee66288fa38",
"children": [
{
"name": "Viewport",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(214, 66, 228, 1)",
"isMask": true,
"cornerRadius": 20
},
"disabled": false
},
{
"script": "components/other/RelativeLayout",
"properties": {
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"once": false
}
}
],
"uuid": "16e8244f-380c-480c-8175-da3c8cda6223",
"children": [
{
"name": "Content",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/RectRenderer",
"properties": {
"fillColor": "rgba(30, 180, 255, 1)",
"height": 511,
"cornerRadius": 20
}
},
{
"script": "components/other/RelativeLayout",
"properties": {
"left": 0,
"right": 0,
"top": 0
}
}
],
"uuid": "f66d93c5-5fee-4c7b-b29c-8af633cae769",
"children": [
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -9.090909090909092,
"y": 0,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "ad防守打法",
"fillColor": "rgba(255, 1, 1, 1)"
}
}
],
"uuid": "77bbe175-8fd9-47c2-a4da-511b889cc69c"
},
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -7.272727272727273,
"y": -412.7272727272727
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "地方发送到发送到",
"fillColor": "rgba(255, 1, 1, 1)"
}
},
{
"script": "components/other/RelativeLayout",
"properties": {
"bottom": 0
}
}
],
"uuid": "cc6ba73f-062b-45ce-b62d-bc3d70da6358"
}
]
}
]
}
]
} }
] ]
} }
...@@ -790,8 +1442,8 @@ ...@@ -790,8 +1442,8 @@
"script": "components/base/Transform", "script": "components/base/Transform",
"properties": { "properties": {
"position": { "position": {
"x": 246.33333333333334, "x": 249.1904761904762,
"y": -356.33333333333337, "y": -379.1904761904762,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -952,7 +1604,7 @@ ...@@ -952,7 +1604,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 0, "x": 0,
"y": -327.5 "y": -313.2142857142857
} }
} }
}, },
...@@ -990,7 +1642,7 @@ ...@@ -990,7 +1642,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 241.33333333333334, "x": 241.33333333333334,
"y": -173.83333333333337, "y": -285.2619047619048,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -1027,7 +1679,7 @@ ...@@ -1027,7 +1679,7 @@
"properties": { "properties": {
"position": { "position": {
"x": -6.166666666666657, "x": -6.166666666666657,
"y": 226.16666666666663, "y": 123.30952380952377,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -1064,7 +1716,7 @@ ...@@ -1064,7 +1716,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 0, "x": 0,
"y": 60 "y": -57.142857142857146
} }
} }
}, },
...@@ -1072,7 +1724,7 @@ ...@@ -1072,7 +1724,7 @@
"script": "components/renderer/TextRenderer", "script": "components/renderer/TextRenderer",
"properties": { "properties": {
"text": "网络异常", "text": "网络异常",
"fillColor": "rgba(255, 255, 255, 1)", "fillColor": "rgba(130, 81, 2, 1)",
"textStyle": { "textStyle": {
"fontSize": 40 "fontSize": 40
} }
...@@ -1092,7 +1744,7 @@ ...@@ -1092,7 +1744,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 0, "x": 0,
"y": -310 "y": -247.14285714285714
} }
} }
}, },
...@@ -1132,7 +1784,7 @@ ...@@ -1132,7 +1784,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 253.83333333333334, "x": 253.83333333333334,
"y": -263.83333333333337, "y": -412.4047619047619,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -1169,7 +1821,7 @@ ...@@ -1169,7 +1821,7 @@
"properties": { "properties": {
"position": { "position": {
"x": -1.1666666666666572, "x": -1.1666666666666572,
"y": 306.16666666666663, "y": 226.16666666666663,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -1213,7 +1865,7 @@ ...@@ -1213,7 +1865,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 0, "x": 0,
"y": 50, "y": -81.42857142857144,
"_type_": "scilla/support/Vector2D" "_type_": "scilla/support/Vector2D"
} }
} }
...@@ -1224,6 +1876,196 @@ ...@@ -1224,6 +1876,196 @@
} }
], ],
"uuid": "5e468650-9e44-4f2d-8dba-be066cd89c37" "uuid": "5e468650-9e44-4f2d-8dba-be066cd89c37"
},
{
"name": "title",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": -228.57142857142858
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(130, 81, 2, 1)",
"text": "获得一等奖"
}
}
],
"uuid": "2f9d765f-8904-4e70-bde6-d885f1fbb937"
},
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": 68.57142857142857
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"fillColor": "rgba(130, 81, 2, 1)",
"text": "水井坊小酒礼盒"
}
}
],
"uuid": "3f462085-e29d-4e3a-b3a4-11246b001b6b"
}
],
"disabled": true
},
{
"name": "Score",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": -256.6666666666667
}
}
},
{
"script": "./scripts/dialogs/PrizeDialogContent",
"properties": {
"pic": "entity|51655474-f891-419c-92e5-0dfa6f75cb67",
"label": "entity|undefined",
"getOrderStatus": "dynamic|API|getOrderStatus"
}
}
],
"uuid": "4e3bc4b3-e5f5-4ae5-a736-9c252085acd7",
"children": [
{
"name": "bg",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|19642cc5-45c3-41ce-9086-5389a295e3ef"
}
}
],
"uuid": "dae270d4-8b62-423e-a58e-a4d379d2ff4e",
"disabled": false
},
{
"name": "CloseButton",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 256.05555555555554,
"y": -397.16666666666674,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|d3c3140f-3210-426b-8a0b-c1811f33044f"
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|d3c3140f-3210-426b-8a0b-c1811f33044f",
"downRes": "res|d3c3140f-3210-426b-8a0b-c1811f33044f",
"disabledRes": "res|d3c3140f-3210-426b-8a0b-c1811f33044f"
}
}
],
"children": [],
"uuid": "9cbb6c4b-2dc4-46bf-b485-481ab9b38df4"
},
{
"name": "rankBtn",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": -1.1666666666666572,
"y": 223.9444444444444,
"_type_": "scilla/support/Vector2D"
}
}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|5d3225cc-1a94-471c-a8db-d24cb44a62c7"
}
},
{
"script": "components/animation/TouchZoom",
"properties": {
"easeName": "backOut"
}
},
{
"script": "components/ui/Button",
"properties": {
"upRes": "res|5d3225cc-1a94-471c-a8db-d24cb44a62c7",
"downRes": "res|5d3225cc-1a94-471c-a8db-d24cb44a62c7",
"disabledRes": "res|5d3225cc-1a94-471c-a8db-d24cb44a62c7",
"onClick": [
{
"entity": "entity|4e3bc4b3-e5f5-4ae5-a736-9c252085acd7",
"component": 1,
"method": "onClick_usebtn"
}
]
}
}
],
"children": [],
"uuid": "4a734c89-1151-4e2e-99ae-773c03482c88"
},
{
"name": "Label",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": -197.77777777777777
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "恭喜你共摇出10颗喜糖",
"fillColor": "rgba(130, 81, 2, 1)"
}
}
],
"uuid": "03779188-0be4-44e9-a348-c01cbcda6865"
} }
], ],
"disabled": true "disabled": true
...@@ -1383,6 +2225,30 @@ ...@@ -1383,6 +2225,30 @@
] ]
} }
}, },
{
"uuid": "1fbceff5-d327-43eb-ab17-4cd54cb440a5",
"url": "sheets/rank.sht-disperse",
"config": {
"textures": [
{
"name": "1.png",
"uuid": "598c0eb5-ea0e-41dc-adcb-d808fe0ac95f"
},
{
"name": "2.png",
"uuid": "cf2931eb-bd7a-4ef6-8b71-9b67dc633306"
},
{
"name": "3.png",
"uuid": "d6139441-67ce-4290-94b4-43971b310753"
},
{
"name": "返回首页.png",
"uuid": "96f7f590-a82a-422f-803d-6e4e454b6dc5"
}
]
}
},
{ {
"uuid": "57b12603-85b6-4aa9-9fa6-072674a8d674", "uuid": "57b12603-85b6-4aa9-9fa6-072674a8d674",
"url": "sheets/rule.sht-disperse", "url": "sheets/rule.sht-disperse",
...@@ -1399,6 +2265,22 @@ ...@@ -1399,6 +2265,22 @@
] ]
} }
}, },
{
"uuid": "6e959768-d04d-4a1b-a28d-649d0ee9c769",
"url": "sheets/score.sht-disperse",
"config": {
"textures": [
{
"name": "弹窗-完成.png",
"uuid": "19642cc5-45c3-41ce-9086-5389a295e3ef"
},
{
"name": "按钮.png",
"uuid": "5d3225cc-1a94-471c-a8db-d24cb44a62c7"
}
]
}
},
{ {
"uuid": "ed0e6061-7014-492f-b95f-88794de7d5cc", "uuid": "ed0e6061-7014-492f-b95f-88794de7d5cc",
"url": "sheets/start.sht-disperse", "url": "sheets/start.sht-disperse",
...@@ -1439,10 +2321,22 @@ ...@@ -1439,10 +2321,22 @@
"uuid": "d3c3140f-3210-426b-8a0b-c1811f33044f", "uuid": "d3c3140f-3210-426b-8a0b-c1811f33044f",
"url": "singles/closebtn.png" "url": "singles/closebtn.png"
}, },
{
"uuid": "8ad59445-0ff2-4382-bb1c-9f7a07845e48",
"url": "singles/logo.png"
},
{ {
"uuid": "3a78d5ce-8939-4fb9-8aad-23e5f8a179b4", "uuid": "3a78d5ce-8939-4fb9-8aad-23e5f8a179b4",
"url": "singles/playbg.jpg" "url": "singles/playbg.jpg"
}, },
{
"uuid": "8b7f9aab-a69b-4bff-99b7-f3710d565403",
"url": "singles/ran_cankao.png"
},
{
"uuid": "6c90daea-7dde-4b18-823a-e4f8141b7b41",
"url": "singles/rankbg.jpg"
},
{ {
"uuid": "20070530-0eaf-4e77-af40-bee6392b5e52", "uuid": "20070530-0eaf-4e77-af40-bee6392b5e52",
"url": "singles/按钮.png" "url": "singles/按钮.png"
......
/**
* Created by rockyl on 2019-04-10.
*
* 警告对话框内容
*/
import { Entity } from "scilla/src";
import DialogContent from "../popup/DialogContent";
export default class ScoreDialogContent extends DialogContent {
content: Entity;
onAwake() {
super.onAwake();
}
setup(data: any = {}) {
}
}
{"ver":"1.0.1","uuid":"3a09e137-303f-434e-a26e-6f19216e962f","subMetas":{},"type":"script"}
...@@ -108,7 +108,7 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView ...@@ -108,7 +108,7 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView
if (!this._startTag) return; if (!this._startTag) return;
this._msPassed += (Date.now() - this._lastTimer); this._msPassed += (Date.now() - this._lastTimer);
const left = this.COUNT_DOWN_SEC * 1000 - this._msPassed; const left = this.COUNT_DOWN_SEC * 1000 - this._msPassed;
console.log(left) // console.log(left)
const mPassed = Math.floor(left / 1000); const mPassed = Math.floor(left / 1000);
let msPassed = left % 1000; let msPassed = left % 1000;
msPassed = Math.floor(msPassed / 10); msPassed = Math.floor(msPassed / 10);
......
...@@ -2,11 +2,16 @@ ...@@ -2,11 +2,16 @@
import ScillaComponent from "scilla-components/src/base/ScillaComponent"; import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { alien } from "../navigator/StackNavigator"; import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator"; import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { Entity } from "scilla/src";
import { RectRenderer, Transform } from "scilla-components/src";
export default class SceneResult extends ScillaComponent implements INavigatorViewBase { export default class SceneResult extends ScillaComponent implements INavigatorViewBase {
avatar: Entity;
onAwake() { onAwake() {
super.onAwake(); super.onAwake();
// const rectRender = this.avatar.getComponent(RectRenderer);
// rectRender.isMask = true;
// rectRender.maskVisible = true;
} }
// _timer // _timer
......
...@@ -31,8 +31,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -31,8 +31,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onClick_startbtn() { onClick_startbtn() {
this.startbtn.getComponent(Button).enabled = false; this.startbtn.getComponent(Button).enabled = false;
// this.sendDojoin(); this.sendDojoin();
this.bubbling('fuck', 'play'); // this.bubbling('fuck', 'play');
} }
sendDojoin() { sendDojoin() {
...@@ -115,7 +115,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -115,7 +115,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
onClick_rankbtn() { onClick_rankbtn() {
alert('onClick_rankbtn') // alert('onClick_rankbtn');
this.bubbling('fuck', 'result');
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose); // globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
} }
......
{"ver":"1.0.1","uuid":"8de41bf2-0b03-42d7-bbb9-8d01f3cad181","subMetas":{},"isGroup":true}
/**
* Created by rockyl on 2019-01-03.
*
* 砖块动画单体
*/
import ScillaComponent from 'components/base/ScillaComponent';
export default class RankList extends ScillaComponent {
onAwake() {
super.onAwake();
}
}
{"ver":"1.0.1","uuid":"8960d977-3ca8-482b-b15a-9dac7438d253","subMetas":{},"type":"script"}
assets/sheets/prize.sht/prizebg.png

192 KB | W: | H:

assets/sheets/prize.sht/prizebg.png

78.5 KB | W: | H:

assets/sheets/prize.sht/prizebg.png
assets/sheets/prize.sht/prizebg.png
assets/sheets/prize.sht/prizebg.png
assets/sheets/prize.sht/prizebg.png
  • 2-up
  • Swipe
  • Onion skin
assets/sheets/prize.sht/usebtn.png

12 KB | W: | H:

assets/sheets/prize.sht/usebtn.png

16.7 KB | W: | H:

assets/sheets/prize.sht/usebtn.png
assets/sheets/prize.sht/usebtn.png
assets/sheets/prize.sht/usebtn.png
assets/sheets/prize.sht/usebtn.png
  • 2-up
  • Swipe
  • Onion skin
{"ver":"1.0.1","uuid":"1fbceff5-d327-43eb-ab17-4cd54cb440a5","subMetas":{"1.png":{"ver":"1.0.1","uuid":"598c0eb5-ea0e-41dc-adcb-d808fe0ac95f","rawTextureUuid":"1fbceff5-d327-43eb-ab17-4cd54cb440a5","type":"texture"},"2.png":{"ver":"1.0.1","uuid":"cf2931eb-bd7a-4ef6-8b71-9b67dc633306","rawTextureUuid":"1fbceff5-d327-43eb-ab17-4cd54cb440a5","type":"texture"},"3.png":{"ver":"1.0.1","uuid":"d6139441-67ce-4290-94b4-43971b310753","rawTextureUuid":"1fbceff5-d327-43eb-ab17-4cd54cb440a5","type":"texture"},"返回首页.png":{"ver":"1.0.1","uuid":"96f7f590-a82a-422f-803d-6e4e454b6dc5","rawTextureUuid":"1fbceff5-d327-43eb-ab17-4cd54cb440a5","type":"texture"}},"type":"sheet"}
{"ver":"1.0.1","uuid":"30d8c878-4721-452c-be69-5a7ff3b8c384","subMetas":{},"isGroup":true}
{"ver":"1.0.1","uuid":"6e959768-d04d-4a1b-a28d-649d0ee9c769","subMetas":{"弹窗-完成.png":{"ver":"1.0.1","uuid":"19642cc5-45c3-41ce-9086-5389a295e3ef","rawTextureUuid":"6e959768-d04d-4a1b-a28d-649d0ee9c769","type":"texture"},"按钮.png":{"ver":"1.0.1","uuid":"5d3225cc-1a94-471c-a8db-d24cb44a62c7","rawTextureUuid":"6e959768-d04d-4a1b-a28d-649d0ee9c769","type":"texture"}},"type":"sheet"}
assets/sheets/start.sht/recordbtn.png

5.29 KB | W: | H:

assets/sheets/start.sht/recordbtn.png

5.12 KB | W: | H:

assets/sheets/start.sht/recordbtn.png
assets/sheets/start.sht/recordbtn.png
assets/sheets/start.sht/recordbtn.png
assets/sheets/start.sht/recordbtn.png
  • 2-up
  • Swipe
  • Onion skin
assets/sheets/start.sht/rulebtn.png

5.06 KB | W: | H:

assets/sheets/start.sht/rulebtn.png

5.11 KB | W: | H:

assets/sheets/start.sht/rulebtn.png
assets/sheets/start.sht/rulebtn.png
assets/sheets/start.sht/rulebtn.png
assets/sheets/start.sht/rulebtn.png
  • 2-up
  • Swipe
  • Onion skin
assets/singles/alertbg.png

156 KB | W: | H:

assets/singles/alertbg.png

77.8 KB | W: | H:

assets/singles/alertbg.png
assets/singles/alertbg.png
assets/singles/alertbg.png
assets/singles/alertbg.png
  • 2-up
  • Swipe
  • Onion skin
{"ver":"1.0.1","uuid":"8b7f9aab-a69b-4bff-99b7-f3710d565403","subMetas":{"ran_cankao":{"ver":"1.0.1","uuid":"d747a595-961c-4084-b44c-e8bcbd984319","rawTextureUuid":"8b7f9aab-a69b-4bff-99b7-f3710d565403","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/shuijf2/assets/singles/ran_cankao.png"}
{"ver":"1.0.1","uuid":"6c90daea-7dde-4b18-823a-e4f8141b7b41","subMetas":{"rankbg":{"ver":"1.0.1","uuid":"e792599d-4776-478c-b0d7-5c667ea9f1f0","rawTextureUuid":"6c90daea-7dde-4b18-823a-e4f8141b7b41","type":"texture"}},"type":"texture","imagePath":"/Users/wanghongyuan/shuijf2/assets/singles/rankbg.jpg"}
assets/singles/按钮.png

11.6 KB | W: | H:

assets/singles/按钮.png

9.46 KB | W: | H:

assets/singles/按钮.png
assets/singles/按钮.png
assets/singles/按钮.png
assets/singles/按钮.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -7074,7 +7074,6 @@ ...@@ -7074,7 +7074,6 @@
return; return;
this._msPassed += (Date.now() - this._lastTimer); this._msPassed += (Date.now() - this._lastTimer);
var left = this.COUNT_DOWN_SEC * 1000 - this._msPassed; var left = this.COUNT_DOWN_SEC * 1000 - this._msPassed;
console.log(left);
var mPassed = Math.floor(left / 1000); var mPassed = Math.floor(left / 1000);
var msPassed = left % 1000; var msPassed = left % 1000;
msPassed = Math.floor(msPassed / 10); msPassed = Math.floor(msPassed / 10);
...@@ -7353,7 +7352,7 @@ ...@@ -7353,7 +7352,7 @@
}; };
SceneStart.prototype.onClick_startbtn = function () { SceneStart.prototype.onClick_startbtn = function () {
this.startbtn.getComponent(Button).enabled = false; this.startbtn.getComponent(Button).enabled = false;
this.bubbling('fuck', 'play'); this.sendDojoin();
}; };
SceneStart.prototype.sendDojoin = function () { SceneStart.prototype.sendDojoin = function () {
var _this = this; var _this = this;
...@@ -7412,7 +7411,7 @@ ...@@ -7412,7 +7411,7 @@
this.bubbling('showDialog', 'Rule'); this.bubbling('showDialog', 'Rule');
}; };
SceneStart.prototype.onClick_rankbtn = function () { SceneStart.prototype.onClick_rankbtn = function () {
alert('onClick_rankbtn'); this.bubbling('fuck', 'result');
}; };
SceneStart.prototype.onClick_recordbtn = function () { SceneStart.prototype.onClick_recordbtn = function () {
alert('onClick_recordbtn'); alert('onClick_recordbtn');
...@@ -7614,402 +7613,76 @@ ...@@ -7614,402 +7613,76 @@
return Icon; return Icon;
}(ScillaComponent)); }(ScillaComponent));
function bearingsToOutPos(bearings) { var RequestMethod;
var _a = engine.renderContext.stageSize, width = _a.width, height = _a.height; (function (RequestMethod) {
var x, y; RequestMethod["GET"] = "GET";
switch (bearings) { RequestMethod["POST"] = "POST";
case 'south': RequestMethod["PUT"] = "PUT";
x = 0; RequestMethod["DELETE"] = "DELETE";
y = height / 2; })(RequestMethod || (RequestMethod = {}));
break; var ApiComponent = (function (_super) {
case 'west': __extends(ApiComponent, _super);
x = -width / 2; function ApiComponent() {
y = 0; var _this = _super !== null && _super.apply(this, arguments) || this;
break; _this.method = RequestMethod.POST;
case 'east': _this.onResponse = new ScillaEvent();
x = width / 2; _this.onError = new ScillaEvent();
y = 0; _this.onFinish = new ScillaEvent();
break; _this.autoCall = false;
case 'north': return _this;
default:
x = 0;
y = -height / 2;
}
return {
x: x, y: y,
};
}
var none = {
show: function (transform, options) {
transform.position.setXY(0, 0);
return Promise.resolve();
},
hide: function (transform, options) {
transform.position.setXY(engine.renderContext.stageSize.width, 0);
return Promise.resolve();
}
};
var fade = {
show: function (transform, options) {
options = options || {};
transform.alpha = 0;
var toProps = {
alpha: 1,
};
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 300, options.easeFunc)
.call(resolve);
});
},
hide: function (transform, options) {
options = options || {};
var toProps = {
alpha: 0,
};
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 200, options.easeFunc)
.call(resolve);
});
} }
}; ApiComponent.prototype.onAwake = function () {
var flew = { _super.prototype.onAwake.call(this);
show: function (transform, options) { if (this.autoCall) {
options = options || {}; this.execute();
var outPos = bearingsToOutPos(options.bearings);
transform.position.copyFrom(outPos);
var toProps = {
position: { x: 0, y: 0, },
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
transform.alpha = 0;
toProps.alpha = 1;
} }
return new Promise(function (resolve) { };
createTween(transform, transform) ApiComponent.prototype.execute = function (paramsInput) {
.to(toProps, options.duration || 300, options.easeFunc || backOut) var args = [];
.call(resolve); for (var _i = 1; _i < arguments.length; _i++) {
}); args[_i - 1] = arguments[_i];
},
hide: function (transform, options) {
options = options || {};
var outPos = bearingsToOutPos(options.bearings);
var toProps = {
position: outPos,
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
toProps.alpha = 0;
} }
return new Promise(function (resolve) { return __awaiter(this, void 0, void 0, function () {
createTween(transform, transform) return __generator(this, function (_a) {
.to(toProps, options.duration || 200, options.easeFunc || backIn) this._args = args;
.call(resolve); return [2];
});
}); });
} };
}; ApiComponent.prototype.onGotResponse = function (response) {
var zoom = { var _a;
show: function (transform, options) { if (this.name) {
options = options || {}; engine.dataCenter.set('API', this.name, response.data);
transform.scale.setXY(0, 0);
var toProps = {
scale: { x: 1, y: 1, },
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
transform.alpha = 0;
toProps.alpha = 1;
} }
return new Promise(function (resolve) { if (this._args && this._args.length > 0) {
createTween(transform, transform) (_a = this.onResponse).invoke.apply(_a, __spread([response.data], this._args));
.to(toProps, options.duration || 300, options.easeFunc || backOut)
.call(resolve);
});
},
hide: function (transform, options) {
options = options || {};
var toProps = {
scale: { x: 0, y: 0 },
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
toProps.alpha = 0;
} }
return new Promise(function (resolve) { else {
createTween(transform, transform) this.onResponse.invoke(response.data);
.to(toProps, options.duration || 200, options.easeFunc || backIn)
.call(resolve);
});
}
};
var dirtyFieldTrigger$7 = dirtyFieldTrigger;
var DialogContent = (function (_super) {
__extends(DialogContent, _super);
function DialogContent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.effect = PopupEffect.flew;
_this.effectImpl = none;
_this.show = function (data, callback) {
_this.bubbling('showDialog', _this.entity.name, data, callback);
};
_this.hide = function (action) {
_this.bubbling('hideDialog', _this.entity.name, action || 'close');
};
return _this;
}
DialogContent.prototype.onModify = function (value, key, oldValue) {
_super.prototype.onModify.call(this, value, key, oldValue);
if (key === 'effect') {
this.effectImpl = effects[value];
} }
this.onCallFinish();
}; };
DialogContent.prototype.onAwake = function () { ApiComponent.prototype.onGotError = function (e) {
var _this = this; var _a;
_super.prototype.onAwake.call(this); if (this._args && this._args.length > 0) {
if (!this._closeButtons) { (_a = this.onError).invoke.apply(_a, __spread([e], this._args));
this._closeButtons = [];
var buttons = this.entity.getChildrenByName('CloseButton');
if (buttons) {
buttons.forEach(function (button) {
var closeBtn = button.getComponent(Button);
closeBtn.onClick.addListener(_this.onTapCloseButton, _this);
});
}
} }
else {
this.onError.invoke(e);
}
this.onCallFinish();
}; };
DialogContent.prototype.onTapCloseButton = function () { ApiComponent.prototype.onCallFinish = function () {
this.hide(); var _a;
}; if (this._args && this._args.length > 0) {
DialogContent.prototype.setup = function (data) { (_a = this.onFinish).invoke.apply(_a, __spread(this._args));
}
else {
this.onFinish.invoke();
}
}; };
__decorate([ return ApiComponent;
dirtyFieldTrigger$7 }(ScillaComponent));
], DialogContent.prototype, "effect", void 0);
return DialogContent;
}(ScillaComponent));
var effects = {
none: none,
fade: fade,
flew: flew,
zoom: zoom,
};
var PopupEffect;
(function (PopupEffect) {
PopupEffect["none"] = "none";
PopupEffect["fade"] = "fade";
PopupEffect["flew"] = "flew";
PopupEffect["zoom"] = "zoom";
})(PopupEffect || (PopupEffect = {}));
var Popup = (function (_super) {
__extends(Popup, _super);
function Popup() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.blackLayerDuration = 300;
_this._dialogStack = [];
return _this;
}
Popup.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
this._touchInterrupt = this.getComponent(TouchInterrupt);
this._touchInterrupt.enabled = false;
this._navigator = this.sceneContainer.getComponent(SingleSceneNavigator);
this.entity.children.forEach(function (child) { return child.enabled = false; });
};
Popup.prototype.fuckNavigator = function (p) {
console.log('fuckNavigator', p);
this._navigator.push(p);
};
Popup.prototype.onUpdate = function (t) {
_super.prototype.onUpdate.call(this, t);
};
Popup.prototype.onSleep = function () {
_super.prototype.onSleep.call(this);
};
Popup.prototype.onDestroy = function () {
_super.prototype.onDestroy.call(this);
};
Popup.prototype.setBgVisible = function (visible) {
this.bgRenderer.enabled = visible;
};
Popup.prototype.getDialogInStack = function (name) {
var e_1, _a;
var result;
try {
for (var _b = __values(this._dialogStack), _c = _b.next(); !_c.done; _c = _b.next()) {
var dialog = _c.value;
if (dialog.name === name) {
result = dialog;
break;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return result;
};
Popup.prototype.bringToTop = function (dialogConfig) {
var index = this._dialogStack.indexOf(dialogConfig);
if (index >= 0) {
this._dialogStack.splice(index, 1);
}
this._dialogStack.push(dialogConfig);
};
Popup.prototype.delete = function (dialogConfig) {
var index = this._dialogStack.indexOf(dialogConfig);
this._dialogStack.splice(index, 1);
};
Popup.prototype.showDialog = function (name, data, callback) {
return __awaiter(this, void 0, void 0, function () {
var dialogConfig, dialog, parent, content, transform, effect, effectOptions;
return __generator(this, function (_a) {
dialogConfig = this.getDialogInStack(name);
dialog = this.entity.getChildrenByName(name)[0];
if (!dialogConfig) {
dialogConfig = {
name: name, data: data, callback: callback, dialog: dialog
};
dialog.enabled = true;
}
this.bringToTop(dialogConfig);
parent = dialog.parent;
parent.removeChild(dialog);
parent.addChildAt(dialog, parent.children.length);
this.setBgVisible(true);
this._touchInterrupt.enabled = true;
content = dialog.getComponent(DialogContent);
content && content.setup(data);
transform = dialog.getComponent(Transform);
effect = content ? content.effectImpl : none;
effectOptions = content ? content.showEffectOptions : null;
return [2];
});
});
};
Popup.prototype.hideDialog = function (name, action, data) {
return __awaiter(this, void 0, void 0, function () {
var dialogConfig, dialog, transform, content, effect, effectOptions;
return __generator(this, function (_a) {
dialogConfig = this.getDialogInStack(name);
if (!dialogConfig) {
return [2];
}
dialog = this.entity.getChildrenByName(name)[0];
this.delete(dialogConfig);
if (this._dialogStack.length === 0) {
this.setBgVisible(false);
this._touchInterrupt.enabled = false;
}
transform = dialog.getComponent(Transform);
content = dialog.getComponent(DialogContent);
effect = content ? content.effectImpl : none;
effectOptions = content ? content.hideEffectOptions : null;
dialog.enabled = false;
if (dialogConfig.callback) {
dialogConfig.callback(action, data);
dialogConfig.callback = null;
}
return [2];
});
});
};
Popup.prototype.hideAll = function () {
var e_2, _a;
try {
for (var _b = __values(this._dialogStack), _c = _b.next(); !_c.done; _c = _b.next()) {
var dialog = _c.value;
this.hideDialog(dialog.name);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
};
return Popup;
}(ScillaComponent));
var RequestMethod;
(function (RequestMethod) {
RequestMethod["GET"] = "GET";
RequestMethod["POST"] = "POST";
RequestMethod["PUT"] = "PUT";
RequestMethod["DELETE"] = "DELETE";
})(RequestMethod || (RequestMethod = {}));
var ApiComponent = (function (_super) {
__extends(ApiComponent, _super);
function ApiComponent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.method = RequestMethod.POST;
_this.onResponse = new ScillaEvent();
_this.onError = new ScillaEvent();
_this.onFinish = new ScillaEvent();
_this.autoCall = false;
return _this;
}
ApiComponent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
if (this.autoCall) {
this.execute();
}
};
ApiComponent.prototype.execute = function (paramsInput) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
this._args = args;
return [2];
});
});
};
ApiComponent.prototype.onGotResponse = function (response) {
var _a;
if (this.name) {
engine.dataCenter.set('API', this.name, response.data);
}
if (this._args && this._args.length > 0) {
(_a = this.onResponse).invoke.apply(_a, __spread([response.data], this._args));
}
else {
this.onResponse.invoke(response.data);
}
this.onCallFinish();
};
ApiComponent.prototype.onGotError = function (e) {
var _a;
if (this._args && this._args.length > 0) {
(_a = this.onError).invoke.apply(_a, __spread([e], this._args));
}
else {
this.onError.invoke(e);
}
this.onCallFinish();
};
ApiComponent.prototype.onCallFinish = function () {
var _a;
if (this._args && this._args.length > 0) {
(_a = this.onFinish).invoke.apply(_a, __spread(this._args));
}
else {
this.onFinish.invoke();
}
};
return ApiComponent;
}(ScillaComponent));
function callApi(uri, params, method, responseType, ignoreSuccessField) { function callApi(uri, params, method, responseType, ignoreSuccessField) {
if (params === void 0) { params = null; } if (params === void 0) { params = null; }
...@@ -8213,21 +7886,6 @@ ...@@ -8213,21 +7886,6 @@
return SamplePollingApi; return SamplePollingApi;
}(ApiComponent)); }(ApiComponent));
var RuleDialogContent = (function (_super) {
__extends(RuleDialogContent, _super);
function RuleDialogContent() {
return _super !== null && _super.apply(this, arguments) || this;
}
RuleDialogContent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
this._contentRenderer = this.Content.getComponent(HtmlRenderer);
};
RuleDialogContent.prototype.setup = function (data) {
this._contentRenderer.htmlText = this.ajaxElement.rule;
};
return RuleDialogContent;
}(DialogContent));
var Toast = (function (_super) { var Toast = (function (_super) {
__extends(Toast, _super); __extends(Toast, _super);
function Toast() { function Toast() {
...@@ -8362,37 +8020,363 @@ ...@@ -8362,37 +8020,363 @@
return BuriedPointData; return BuriedPointData;
}()); }());
var MainController = (function (_super) { function bearingsToOutPos(bearings) {
__extends(MainController, _super); var _a = engine.renderContext.stageSize, width = _a.width, height = _a.height;
function MainController() { var x, y;
return _super !== null && _super.apply(this, arguments) || this; switch (bearings) {
case 'south':
x = 0;
y = height / 2;
break;
case 'west':
x = -width / 2;
y = 0;
break;
case 'east':
x = width / 2;
y = 0;
break;
case 'north':
default:
x = 0;
y = -height / 2;
} }
MainController.prototype.onAwake = function () { return {
_super.prototype.onAwake.call(this); x: x, y: y,
engine.dataCenter.set('CFG', window['CFG']);
this._toast = this.Toast.getComponent(Toast);
this._popup = this.Popup.getComponent(Popup);
initEnv();
this.broadcast('callApi', 1, 'ajaxElement', { duibaId: this.hdToolId, activityId: this.actId });
};
MainController.prototype.onGotAjaxElement = function () {
this.broadcast('initGameStage');
};
MainController.prototype.onGotAjaxElementError = function (e) {
console.log(e);
};
MainController.prototype.showErrorToast = function (e) {
};
MainController.prototype.showToast = function (content, duration) {
this._toast.show({
content: content,
duration: duration,
});
};
MainController.prototype.showDialog = function (name, data, callback) {
this._popup.showDialog(name, data, callback);
}; };
MainController.prototype.showNetError = function (action) { }
var none = {
show: function (transform, options) {
transform.position.setXY(0, 0);
return Promise.resolve();
},
hide: function (transform, options) {
transform.position.setXY(engine.renderContext.stageSize.width, 0);
return Promise.resolve();
}
};
var fade = {
show: function (transform, options) {
options = options || {};
transform.alpha = 0;
var toProps = {
alpha: 1,
};
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 300, options.easeFunc)
.call(resolve);
});
},
hide: function (transform, options) {
options = options || {};
var toProps = {
alpha: 0,
};
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 200, options.easeFunc)
.call(resolve);
});
}
};
var flew = {
show: function (transform, options) {
options = options || {};
var outPos = bearingsToOutPos(options.bearings);
transform.position.copyFrom(outPos);
var toProps = {
position: { x: 0, y: 0, },
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
transform.alpha = 0;
toProps.alpha = 1;
}
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 300, options.easeFunc || backOut)
.call(resolve);
});
},
hide: function (transform, options) {
options = options || {};
var outPos = bearingsToOutPos(options.bearings);
var toProps = {
position: outPos,
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
toProps.alpha = 0;
}
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 200, options.easeFunc || backIn)
.call(resolve);
});
}
};
var zoom = {
show: function (transform, options) {
options = options || {};
transform.scale.setXY(0, 0);
var toProps = {
scale: { x: 1, y: 1, },
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
transform.alpha = 0;
toProps.alpha = 1;
}
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 300, options.easeFunc || backOut)
.call(resolve);
});
},
hide: function (transform, options) {
options = options || {};
var toProps = {
scale: { x: 0, y: 0 },
};
var withFade = options.hasOwnProperty('withFade') ? options.withFade : false;
if (withFade) {
toProps.alpha = 0;
}
return new Promise(function (resolve) {
createTween(transform, transform)
.to(toProps, options.duration || 200, options.easeFunc || backIn)
.call(resolve);
});
}
};
var dirtyFieldTrigger$7 = dirtyFieldTrigger;
var DialogContent = (function (_super) {
__extends(DialogContent, _super);
function DialogContent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.effect = PopupEffect.flew;
_this.effectImpl = none;
_this.show = function (data, callback) {
_this.bubbling('showDialog', _this.entity.name, data, callback);
};
_this.hide = function (action) {
_this.bubbling('hideDialog', _this.entity.name, action || 'close');
};
return _this;
}
DialogContent.prototype.onModify = function (value, key, oldValue) {
_super.prototype.onModify.call(this, value, key, oldValue);
if (key === 'effect') {
this.effectImpl = effects[value];
}
};
DialogContent.prototype.onAwake = function () {
var _this = this;
_super.prototype.onAwake.call(this);
if (!this._closeButtons) {
this._closeButtons = [];
var buttons = this.entity.getChildrenByName('CloseButton');
if (buttons) {
buttons.forEach(function (button) {
var closeBtn = button.getComponent(Button);
closeBtn.onClick.addListener(_this.onTapCloseButton, _this);
});
}
}
};
DialogContent.prototype.onTapCloseButton = function () {
this.hide();
};
DialogContent.prototype.setup = function (data) {
};
__decorate([
dirtyFieldTrigger$7
], DialogContent.prototype, "effect", void 0);
return DialogContent;
}(ScillaComponent));
var effects = {
none: none,
fade: fade,
flew: flew,
zoom: zoom,
};
var PopupEffect;
(function (PopupEffect) {
PopupEffect["none"] = "none";
PopupEffect["fade"] = "fade";
PopupEffect["flew"] = "flew";
PopupEffect["zoom"] = "zoom";
})(PopupEffect || (PopupEffect = {}));
var Popup = (function (_super) {
__extends(Popup, _super);
function Popup() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.blackLayerDuration = 300;
_this._dialogStack = [];
return _this;
}
Popup.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
this._touchInterrupt = this.getComponent(TouchInterrupt);
this._touchInterrupt.enabled = false;
this._navigator = this.sceneContainer.getComponent(SingleSceneNavigator);
this.entity.children.forEach(function (child) { return child.enabled = false; });
};
Popup.prototype.fuckNavigator = function (p) {
console.log('fuckNavigator', p);
this._navigator.push(p);
};
Popup.prototype.onUpdate = function (t) {
_super.prototype.onUpdate.call(this, t);
};
Popup.prototype.onSleep = function () {
_super.prototype.onSleep.call(this);
};
Popup.prototype.onDestroy = function () {
_super.prototype.onDestroy.call(this);
};
Popup.prototype.setBgVisible = function (visible) {
this.bgRenderer.enabled = visible;
};
Popup.prototype.getDialogInStack = function (name) {
var e_1, _a;
var result;
try {
for (var _b = __values(this._dialogStack), _c = _b.next(); !_c.done; _c = _b.next()) {
var dialog = _c.value;
if (dialog.name === name) {
result = dialog;
break;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return result;
};
Popup.prototype.bringToTop = function (dialogConfig) {
var index = this._dialogStack.indexOf(dialogConfig);
if (index >= 0) {
this._dialogStack.splice(index, 1);
}
this._dialogStack.push(dialogConfig);
};
Popup.prototype.delete = function (dialogConfig) {
var index = this._dialogStack.indexOf(dialogConfig);
this._dialogStack.splice(index, 1);
};
Popup.prototype.showDialog = function (name, data, callback) {
return __awaiter(this, void 0, void 0, function () {
var dialogConfig, dialog, parent, content, transform, effect, effectOptions;
return __generator(this, function (_a) {
dialogConfig = this.getDialogInStack(name);
dialog = this.entity.getChildrenByName(name)[0];
if (!dialogConfig) {
dialogConfig = {
name: name, data: data, callback: callback, dialog: dialog
};
dialog.enabled = true;
}
this.bringToTop(dialogConfig);
parent = dialog.parent;
parent.removeChild(dialog);
parent.addChildAt(dialog, parent.children.length);
this.setBgVisible(true);
this._touchInterrupt.enabled = true;
content = dialog.getComponent(DialogContent);
content && content.setup(data);
transform = dialog.getComponent(Transform);
effect = content ? content.effectImpl : none;
effectOptions = content ? content.showEffectOptions : null;
return [2];
});
});
};
Popup.prototype.hideDialog = function (name, action, data) {
return __awaiter(this, void 0, void 0, function () {
var dialogConfig, dialog, transform, content, effect, effectOptions;
return __generator(this, function (_a) {
dialogConfig = this.getDialogInStack(name);
if (!dialogConfig) {
return [2];
}
dialog = this.entity.getChildrenByName(name)[0];
this.delete(dialogConfig);
if (this._dialogStack.length === 0) {
this.setBgVisible(false);
this._touchInterrupt.enabled = false;
}
transform = dialog.getComponent(Transform);
content = dialog.getComponent(DialogContent);
effect = content ? content.effectImpl : none;
effectOptions = content ? content.hideEffectOptions : null;
dialog.enabled = false;
if (dialogConfig.callback) {
dialogConfig.callback(action, data);
dialogConfig.callback = null;
}
return [2];
});
});
};
Popup.prototype.hideAll = function () {
var e_2, _a;
try {
for (var _b = __values(this._dialogStack), _c = _b.next(); !_c.done; _c = _b.next()) {
var dialog = _c.value;
this.hideDialog(dialog.name);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
};
return Popup;
}(ScillaComponent));
var MainController = (function (_super) {
__extends(MainController, _super);
function MainController() {
return _super !== null && _super.apply(this, arguments) || this;
}
MainController.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
engine.dataCenter.set('CFG', window['CFG']);
this._toast = this.Toast.getComponent(Toast);
this._popup = this.Popup.getComponent(Popup);
initEnv();
this.broadcast('callApi', 1, 'ajaxElement', { duibaId: this.hdToolId, activityId: this.actId });
};
MainController.prototype.onGotAjaxElement = function () {
this.broadcast('initGameStage');
};
MainController.prototype.onGotAjaxElementError = function (e) {
console.log(e);
};
MainController.prototype.showErrorToast = function (e) {
};
MainController.prototype.showToast = function (content, duration) {
this._toast.show({
content: content,
duration: duration,
});
};
MainController.prototype.showDialog = function (name, data, callback) {
this._popup.showDialog(name, data, callback);
};
MainController.prototype.showNetError = function (action) {
}; };
return MainController; return MainController;
}(ScillaComponent)); }(ScillaComponent));
...@@ -8463,6 +8447,21 @@ ...@@ -8463,6 +8447,21 @@
return SampleApi; return SampleApi;
}(ApiComponent)); }(ApiComponent));
var RuleDialogContent = (function (_super) {
__extends(RuleDialogContent, _super);
function RuleDialogContent() {
return _super !== null && _super.apply(this, arguments) || this;
}
RuleDialogContent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
this._contentRenderer = this.Content.getComponent(HtmlRenderer);
};
RuleDialogContent.prototype.setup = function (data) {
this._contentRenderer.htmlText = this.ajaxElement.rule;
};
return RuleDialogContent;
}(DialogContent));
var CustomTextRenderer = (function (_super) { var CustomTextRenderer = (function (_super) {
__extends(CustomTextRenderer, _super); __extends(CustomTextRenderer, _super);
function CustomTextRenderer() { function CustomTextRenderer() {
...@@ -8579,21 +8578,21 @@ ...@@ -8579,21 +8578,21 @@
registerDef('components/ui/Button', Button); registerDef('components/ui/Button', Button);
registerDef('components/renderer/TextRenderer', TextRenderer); registerDef('components/renderer/TextRenderer', TextRenderer);
registerDef('components/other/FullStageSize', FullStageSize); registerDef('components/other/FullStageSize', FullStageSize);
registerDef('components/base/TouchInterrupt', TouchInterrupt);
registerDef('components/renderer/RectRenderer', RectRenderer); registerDef('components/renderer/RectRenderer', RectRenderer);
registerDef('components/ui/ScrollView', ScrollView); registerDef('components/ui/ScrollView', ScrollView);
registerDef('components/other/RelativeLayout', RelativeLayout); registerDef('components/other/RelativeLayout', RelativeLayout);
registerDef('components/base/TouchInterrupt', TouchInterrupt);
registerDef('components/renderer/HtmlRenderer', HtmlRenderer); registerDef('components/renderer/HtmlRenderer', HtmlRenderer);
registerDef('./scripts/scenes/ScenePlay', ScenePlay); registerDef('./scripts/scenes/ScenePlay', ScenePlay);
registerDef('./scripts/navigator/SingleSceneNavigator', SingleSceneNavigator); registerDef('./scripts/navigator/SingleSceneNavigator', SingleSceneNavigator);
registerDef('./scripts/Icon', Icon); registerDef('./scripts/Icon', Icon);
registerDef('./scripts/scenes/SceneResult', SceneResult); registerDef('./scripts/scenes/SceneResult', SceneResult);
registerDef('./scripts/popup/Popup', Popup);
registerDef('./scripts/scenes/SceneStart', SceneStart); registerDef('./scripts/scenes/SceneStart', SceneStart);
registerDef('./scripts/api/SamplePollingApi', SamplePollingApi); registerDef('./scripts/api/SamplePollingApi', SamplePollingApi);
registerDef('./scripts/dialogs/RuleDialogContent', RuleDialogContent);
registerDef('./scripts/MainController', MainController); registerDef('./scripts/MainController', MainController);
registerDef('./scripts/popup/Popup', Popup);
registerDef('./scripts/api/SampleApi', SampleApi); registerDef('./scripts/api/SampleApi', SampleApi);
registerDef('./scripts/dialogs/RuleDialogContent', RuleDialogContent);
registerDef('./scripts/game/CustomTextRenderer', CustomTextRenderer); registerDef('./scripts/game/CustomTextRenderer', CustomTextRenderer);
registerDef('./scripts/scenes/SceneController', SceneController); registerDef('./scripts/scenes/SceneController', SceneController);
registerDef('./scripts/dialogs/AlertDialogContent', AlertDialogContent); registerDef('./scripts/dialogs/AlertDialogContent', AlertDialogContent);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -26,17 +26,17 @@ registerDef('components/renderer/TextRenderer', component5); ...@@ -26,17 +26,17 @@ registerDef('components/renderer/TextRenderer', component5);
import component6 from 'components/other/FullStageSize'; import component6 from 'components/other/FullStageSize';
registerDef('components/other/FullStageSize', component6); registerDef('components/other/FullStageSize', component6);
import component7 from 'components/base/TouchInterrupt'; import component7 from 'components/renderer/RectRenderer';
registerDef('components/base/TouchInterrupt', component7); registerDef('components/renderer/RectRenderer', component7);
import component8 from 'components/renderer/RectRenderer'; import component8 from 'components/ui/ScrollView';
registerDef('components/renderer/RectRenderer', component8); registerDef('components/ui/ScrollView', component8);
import component9 from 'components/ui/ScrollView'; import component9 from 'components/other/RelativeLayout';
registerDef('components/ui/ScrollView', component9); registerDef('components/other/RelativeLayout', component9);
import component10 from 'components/other/RelativeLayout'; import component10 from 'components/base/TouchInterrupt';
registerDef('components/other/RelativeLayout', component10); registerDef('components/base/TouchInterrupt', component10);
import component11 from 'components/renderer/HtmlRenderer'; import component11 from 'components/renderer/HtmlRenderer';
registerDef('components/renderer/HtmlRenderer', component11); registerDef('components/renderer/HtmlRenderer', component11);
...@@ -53,23 +53,23 @@ registerDef('./scripts/Icon', component14); ...@@ -53,23 +53,23 @@ registerDef('./scripts/Icon', component14);
import component15 from '../../assets/scripts/scenes/SceneResult'; import component15 from '../../assets/scripts/scenes/SceneResult';
registerDef('./scripts/scenes/SceneResult', component15); registerDef('./scripts/scenes/SceneResult', component15);
import component16 from '../../assets/scripts/popup/Popup'; import component16 from '../../assets/scripts/scenes/SceneStart';
registerDef('./scripts/popup/Popup', component16); registerDef('./scripts/scenes/SceneStart', component16);
import component17 from '../../assets/scripts/scenes/SceneStart'; import component17 from '../../assets/scripts/api/SamplePollingApi';
registerDef('./scripts/scenes/SceneStart', component17); registerDef('./scripts/api/SamplePollingApi', component17);
import component18 from '../../assets/scripts/api/SamplePollingApi'; import component18 from '../../assets/scripts/MainController';
registerDef('./scripts/api/SamplePollingApi', component18); registerDef('./scripts/MainController', component18);
import component19 from '../../assets/scripts/dialogs/RuleDialogContent'; import component19 from '../../assets/scripts/popup/Popup';
registerDef('./scripts/dialogs/RuleDialogContent', component19); registerDef('./scripts/popup/Popup', component19);
import component20 from '../../assets/scripts/MainController'; import component20 from '../../assets/scripts/api/SampleApi';
registerDef('./scripts/MainController', component20); registerDef('./scripts/api/SampleApi', component20);
import component21 from '../../assets/scripts/api/SampleApi'; import component21 from '../../assets/scripts/dialogs/RuleDialogContent';
registerDef('./scripts/api/SampleApi', component21); registerDef('./scripts/dialogs/RuleDialogContent', component21);
import component22 from '../../assets/scripts/game/CustomTextRenderer'; import component22 from '../../assets/scripts/game/CustomTextRenderer';
registerDef('./scripts/game/CustomTextRenderer', component22); registerDef('./scripts/game/CustomTextRenderer', component22);
......
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