Commit 63f612c5 authored by 任建锋's avatar 任建锋

Merge branch 'dev' of http://gitlab2.dui88.com/laoqifeng/zeroing-libs into dev

parents 9f5a583e 269a6735
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14,13 +14,18 @@ ...@@ -14,13 +14,18 @@
"type": "boolean", "type": "boolean",
"alias": "是否捕获", "alias": "是否捕获",
"default": true "default": true
},
"isGlobal": {
"type": "boolean",
"alias": "是否全局",
"default": true
} }
}, },
"output": [ "output": [
"success" "success"
], ],
"id": "dispatch-event", "id": "dispatch-event",
"script": "var eventName = engine.findVariable('eventName', args, props);\nvar data = engine.findVariable('data', args, props);\nvar useCapture = engine.findVariable('useCapture', args, props);\nif (eventName) {\n engine.globalEvent.dispatchEvent(eventName, data, useCapture);\n}\nnext('success', args);\n", "script": "var eventName = engine.findVariable('eventName', args, props);\nvar data = engine.findVariable('data', args, props);\nvar useCapture = engine.findVariable('useCapture', args, props);\nvar isGlobal = engine.findVariable('isGlobal', args, props);\nif (eventName) {\n var sender = isGlobal ? engine.globalEvent : target;\n sender.dispatchEvent(eventName, data, useCapture);\n}\nnext('success', args);\n",
"group": "base", "group": "base",
"type": "builtin" "type": "builtin"
} }
{ {
"props": {}, "props": {
"map": {
"alias": "UA包含表",
"type": "map"
}
},
"name": "环境判断", "name": "环境判断",
"output": [ "output": [
"success" "success"
], ],
"id": "env-judge", "id": "env-judge",
"script": "var ua = navigator.userAgent.toLowerCase();\nvar env;\nif (ua.indexOf('eversunshine') >= 0) {\n env = 'eversunshine';\n}\nelse if (ua.indexOf('micromessenger') >= 0) {\n env = 'weixin';\n}\nconsole.log('env:', env);\nvar payload = args || {};\npayload.env = env;\nnext('success', payload);\n", "script": "var map = engine.findVariable('map', args, props);\nvar ua = navigator.userAgent.toLowerCase();\nvar env;\nif (map) {\n for (var key in map) {\n if (ua.indexOf(key) >= 0) {\n env = map[key];\n break;\n }\n }\n}\nvar payload = args || {};\npayload.env = env;\nnext('success', payload);\n",
"group": "base", "group": "base",
"type": "builtin" "type": "builtin"
} }
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
"metas": [ "metas": [
{ {
"id": "duiba-api-transform", "id": "duiba-api-transform",
"script": "if (args.success) {\n next('success', args.data);\n}\nelse {\n\tengine.globalEvent.dispatchEvent('net-failed', args);\n next('failed', args);\n}\n", "script": "if (args.success) {\n\tvar payload;\n\n\tif (typeof args.data === 'object') {\n\t\tpayload = engine.objClone(args.data);\n\n\t\tvar origin = engine.objClone(args);\n\t\tObject.defineProperty(payload, '__origin', {\n\t\t\tget: function () {\n\t\t\t\treturn origin\n\t\t\t},\n\t\t\tenumerable: false\n\t\t});\n\t} else {\n\t\tpayload = args.data;\n\t}\n\tnext('success', payload);\n}\nelse {\n\tengine.globalEvent.dispatchEvent('net-failed', args);\n\tnext('failed', args);\n}",
"props": {}, "props": {},
"isInline": true, "isInline": true,
"name": "兑吧接口转换", "name": "兑吧接口转换",
......
{
"name": "兑吧接口轮询",
"props": {
"url": {
"type": "string",
"alias": "链接"
},
"method": {
"type": "enum",
"enum": [
"get",
"post"
],
"alias": "方法",
"default": "get"
},
"count": {
"type": "number",
"alias": "次数",
"default": 10
},
"delay": {
"type": "number",
"default": 500,
"alias": "单次延时"
},
"name": {
"type": "string",
"alias": "数据名"
},
"field": {
"type": "string",
"alias": "字段名"
},
"successValues": {
"type": "string",
"alias": "成功值"
},
"params": {
"type": "map",
"alias": "参数"
},
"headers": {
"type": "map",
"alias": "头部"
}
},
"output": [
"success",
"failed",
"timeout"
],
"sub": {
"442452af-e4d2-47be-b931-86fef866056f": {
"uuid": "442452af-e4d2-47be-b931-86fef866056f",
"meta": "entry",
"props": {},
"output": {
"success": [
"2b895831-d362-491a-a57b-cd6e2d7223a8"
]
}
},
"9def8371-1326-4daa-8220-78cf888297e3": {
"uuid": "9def8371-1326-4daa-8220-78cf888297e3",
"meta": "wait",
"props": {
"duration": {
"type": "link",
"alias": "delay"
}
},
"output": {
"complete": [
"2b895831-d362-491a-a57b-cd6e2d7223a8"
]
}
},
"b88c8995-28eb-470f-a8a2-7484c9f98e05": {
"uuid": "b88c8995-28eb-470f-a8a2-7484c9f98e05",
"meta": "http-polling-judge",
"props": {
"count": {
"type": "link"
},
"field": {
"type": "link"
},
"successValues": {
"type": "link"
}
},
"output": {
"continue": [
"9def8371-1326-4daa-8220-78cf888297e3"
]
}
},
"2b895831-d362-491a-a57b-cd6e2d7223a8": {
"uuid": "2b895831-d362-491a-a57b-cd6e2d7223a8",
"meta": "duiba-api",
"props": {
"url": {
"type": "link"
},
"method": {
"type": "link"
},
"name": {
"type": "link"
},
"params": {
"type": "link"
},
"headers": {
"type": "link"
}
},
"output": {
"success": [
"b88c8995-28eb-470f-a8a2-7484c9f98e05"
]
}
}
},
"subEntry": "442452af-e4d2-47be-b931-86fef866056f",
"metas": [
{
"script": "var count = props.count, field = props.field, successValues = props.successValues;\nvar key = 'counting-' + vm.id;\nvar counting = global[key] || 0;\ncounting++;\nvar successValue = engine.getDataByPath(args, field) + '';\nvar successArr = successValues.split(',');\nif (successArr.indexOf(successValue) >= 0) {\n delete global[key];\n next('success', args);\n}\nelse if (counting < count) {\n global[key] = counting;\n next('continue');\n}\nelse {\n delete global[key];\n next('timeout');\n}",
"props": {
"count": {
"type": "number",
"default": 5,
"alias": "次数"
},
"field": {
"type": "string",
"alias": "字段名",
"default": "status"
},
"successValues": {
"type": "string",
"alias": "成功值"
}
},
"name": "轮询判断",
"output": [
"success",
"continue",
"timeout"
],
"id": "http-polling-judge",
"group": "net",
"type": "builtin"
}
],
"id": "duiba-polling",
"group": "duiba",
"type": "builtin"
}
{
"props": {
"weichatShareView": {
"type": "string",
"enum": [],
"alias": "微信分享引导弹窗"
},
"shareSuccessView": {
"type": "string",
"enum": [],
"alias": "分享成功弹窗"
},
"successEvent": {
"type": "string",
"enum": [],
"alias": "成功事件"
}
},
"name": "执行分享逻辑",
"output": [],
"sub": {
"55d7b124-59ae-4436-bcda-0a0c96426f7a": {
"uuid": "55d7b124-59ae-4436-bcda-0a0c96426f7a",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"845311af-a1ed-4f59-a162-e8115f5f9d1b"
]
}
},
"845311af-a1ed-4f59-a162-e8115f5f9d1b": {
"uuid": "845311af-a1ed-4f59-a162-e8115f5f9d1b",
"meta": "f822b421-a9ee-4507-84cc-3a73c7409be1",
"design": {
"x": 194,
"y": 57,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 17.5
}
],
"failed": [
{
"x": 124.5,
"y": 31.5
}
],
"weichat": [
{
"x": 124.5,
"y": 45.5
}
]
}
},
"props": {},
"output": {
"success": [
"77a3ef2d-b7bf-4502-8711-1eb7bedff765"
],
"failed": [],
"weichat": [
"d9b45fb9-a353-4888-afe8-def5de615818"
]
}
},
"77a3ef2d-b7bf-4502-8711-1eb7bedff765": {
"uuid": "77a3ef2d-b7bf-4502-8711-1eb7bedff765",
"meta": "api-request",
"design": {
"x": 410,
"y": 6,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 68.5
}
],
"failed": [
{
"x": 124.5,
"y": 82.5
}
],
"exception": [
{
"x": 124.5,
"y": 96.5
}
]
}
},
"props": {
"uri": "lipstick/share.do",
"params": {
"type": "map",
"value": {
"channelType": {
"type": "env",
"value": "channelType"
}
}
}
},
"output": {
"success": [
"598b346d-0959-4a85-8a0a-76b6bda9181f"
],
"failed": [
"b50492a4-ef2c-4cd5-afd9-52db7d472edf"
],
"exception": [
"b50492a4-ef2c-4cd5-afd9-52db7d472edf"
]
}
},
"1decb2de-a422-4cc4-8700-1945e4bcbed3": {
"uuid": "1decb2de-a422-4cc4-8700-1945e4bcbed3",
"meta": "pop-dialog",
"design": {
"x": 919,
"y": 94,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {},
"output": {}
},
"d9b45fb9-a353-4888-afe8-def5de615818": {
"uuid": "d9b45fb9-a353-4888-afe8-def5de615818",
"meta": "push-dialog",
"design": {
"x": 411,
"y": 235,
"input": {
"default": [
{
"x": 5.5,
"y": 48.5
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 48.5
}
]
}
},
"props": {
"viewName": {
"type": "link",
"alias": "weichatShareView"
}
},
"output": {},
"alias": "微信分享引导弹窗"
},
"598b346d-0959-4a85-8a0a-76b6bda9181f": {
"uuid": "598b346d-0959-4a85-8a0a-76b6bda9181f",
"meta": "d2cf224c-e451-447e-8c5a-1c963f7a01b0",
"design": {
"x": 636,
"y": 0,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"close": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"success": [
"54ecdde8-5ef1-47ef-95a3-a49d8f13f345"
],
"failed": [],
"close": [
"1decb2de-a422-4cc4-8700-1945e4bcbed3"
]
}
},
"b50492a4-ef2c-4cd5-afd9-52db7d472edf": {
"uuid": "b50492a4-ef2c-4cd5-afd9-52db7d472edf",
"meta": "6f5e39c3-341e-4b90-9690-783de5466937",
"design": {
"x": 668,
"y": 253,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
},
"54ecdde8-5ef1-47ef-95a3-a49d8f13f345": {
"uuid": "54ecdde8-5ef1-47ef-95a3-a49d8f13f345",
"meta": "b54bfb2f-57fe-407d-b71a-1ebab5eb59cf",
"design": {
"x": 924,
"y": -15,
"input": {
"default": [
{
"x": 5.5,
"y": 48.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 41.5
}
],
"failed": [
{
"x": 124.5,
"y": 55.5
}
]
}
},
"props": {
"shareSuccessView": {
"type": "link",
"alias": "shareSuccessView"
},
"successEvent": {
"type": "link",
"alias": "successEvent"
}
},
"output": {}
}
},
"subEntry": "55d7b124-59ae-4436-bcda-0a0c96426f7a",
"metas": [
{
"id": "f822b421-a9ee-4507-84cc-3a73c7409be1",
"script": "\nif(engine.env.channelType==\"1\"){\n let opts={\n shareTitle:engine.env.shareTitle,\n shareContent:engine.env.shareContent,\n shareUrl:engine.env.shareUrl,\n shareThumbnail:engine.env.shareThumbnail,\n }\n window[\"requireShare\"](opts,()=>{\n next(\"success\")\n },()=>{\n next(\"failed\")\n });\n}else{\n next(\"weichat\")\n}",
"props": {},
"isInline": true,
"name": "执行分享方法",
"output": [
"success",
"failed",
"weichat"
],
"sub": {
"9391b950-6e2e-477c-93d4-1bfb377cc647": {
"uuid": "9391b950-6e2e-477c-93d4-1bfb377cc647",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "9391b950-6e2e-477c-93d4-1bfb377cc647"
},
{
"id": "d2cf224c-e451-447e-8c5a-1c963f7a01b0",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "组件异常处理",
"output": [
"success",
"close"
],
"sub": {
"626001a8-2b34-4640-9be8-129c1f4a020b": {
"uuid": "626001a8-2b34-4640-9be8-129c1f4a020b",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"a38e20b5-d00e-4c55-94b5-e44d2c28ee1a"
]
}
},
"a38e20b5-d00e-4c55-94b5-e44d2c28ee1a": {
"uuid": "a38e20b5-d00e-4c55-94b5-e44d2c28ee1a",
"meta": "232e7e7c-b355-4a8f-9e71-922e0f53bf87",
"design": {
"x": 210,
"y": 75,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"failed": [
"d9897477-c675-4562-bc0e-5e6c554e80b0"
]
}
},
"d9897477-c675-4562-bc0e-5e6c554e80b0": {
"uuid": "d9897477-c675-4562-bc0e-5e6c554e80b0",
"meta": "show-toast",
"design": {
"x": 447,
"y": 102,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 82.5
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200
},
"output": {
"success": [
"af837ac1-6da5-4913-b945-10eab22fba07"
]
}
},
"af837ac1-6da5-4913-b945-10eab22fba07": {
"uuid": "af837ac1-6da5-4913-b945-10eab22fba07",
"meta": "f2578ea7-67c7-45b1-b41b-7663361957f7",
"design": {
"x": 692,
"y": 171,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"close": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "626001a8-2b34-4640-9be8-129c1f4a020b",
"metas": [
{
"id": "232e7e7c-b355-4a8f-9e71-922e0f53bf87",
"script": "if(args.interrupt){\n if(args.errorMessage){\n next(\"failed\",{text:args.errorMessage})\n }else{\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n }\n \n}else{\n next(\"success\",args)\n}",
"props": {},
"isInline": true,
"from": "custom",
"name": "判错逻辑",
"output": [
"success",
"failed"
]
},
{
"id": "f2578ea7-67c7-45b1-b41b-7663361957f7",
"script": "next(\"close\",args)",
"props": {},
"isInline": true,
"from": "custom",
"name": "终止",
"output": [
"close"
]
}
]
},
{
"id": "6f5e39c3-341e-4b90-9690-783de5466937",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "接口异常Toast",
"output": [
"success",
"failed"
],
"sub": {
"6c6b9ec9-76dc-44a4-a436-7c016e4f2599": {
"uuid": "6c6b9ec9-76dc-44a4-a436-7c016e4f2599",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"3d797ee7-1e6e-4ae1-9718-13292001b2b4"
]
}
},
"3d797ee7-1e6e-4ae1-9718-13292001b2b4": {
"uuid": "3d797ee7-1e6e-4ae1-9718-13292001b2b4",
"meta": "096eec4b-4603-4c5e-b762-498915345e18",
"design": {
"x": 201,
"y": 199,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"success": [],
"failed": [
"4d0225a7-24bb-4a1d-b14c-13d6a15e304b"
]
}
},
"57b7e460-2717-479a-a789-a25d1b9373f4": {
"uuid": "57b7e460-2717-479a-a789-a25d1b9373f4",
"meta": "show-toast",
"design": {
"x": 684,
"y": 218,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 82.5
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200,
"viewName": ""
},
"output": {}
},
"4d0225a7-24bb-4a1d-b14c-13d6a15e304b": {
"uuid": "4d0225a7-24bb-4a1d-b14c-13d6a15e304b",
"meta": "fadbbfe0-aff9-401d-a001-9b1091fb464e",
"design": {
"x": 414,
"y": 219,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"57b7e460-2717-479a-a789-a25d1b9373f4"
],
"p1": [
"c456022e-25b9-44dd-9bf6-e7973b173922"
]
}
},
"c456022e-25b9-44dd-9bf6-e7973b173922": {
"uuid": "c456022e-25b9-44dd-9bf6-e7973b173922",
"meta": "wait",
"design": {
"x": 678,
"y": 410,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"duration": 1000
},
"output": {
"complete": [
"e02a8757-cfaa-47cc-8c4a-2965d18e63c8"
]
}
},
"e02a8757-cfaa-47cc-8c4a-2965d18e63c8": {
"uuid": "e02a8757-cfaa-47cc-8c4a-2965d18e63c8",
"meta": "f3b3d538-e0a3-49bc-8363-4520b691710b",
"design": {
"x": 956,
"y": 483,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "6c6b9ec9-76dc-44a4-a436-7c016e4f2599",
"metas": [
{
"id": "096eec4b-4603-4c5e-b762-498915345e18",
"script": "console.log(args)\nif(!args){\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n}else{\n if(args.message){\n if(args.code!='100001'){\n next(\"failed\",{text:args.message})\n }\n }else{\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n }\n}\n",
"props": {},
"isInline": true,
"from": "custom",
"name": "判错逻辑",
"output": [
"success",
"failed"
]
},
{
"id": "fadbbfe0-aff9-401d-a001-9b1091fb464e",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "f3b3d538-e0a3-49bc-8363-4520b691710b",
"script": "next(\"success\")",
"props": {},
"isInline": true,
"from": "custom",
"name": "终止",
"output": [
"success"
]
}
]
},
{
"id": "b54bfb2f-57fe-407d-b71a-1ebab5eb59cf",
"script": "",
"props": {
"shareSuccessView": {
"type": "string",
"enum": [],
"alias": "分享成功弹窗"
},
"successEvent": {
"type": "string",
"enum": [],
"alias": "成功事件"
}
},
"isInline": true,
"from": "custom",
"name": "分享成功处理",
"output": [
"success",
"failed"
],
"sub": {
"95048c23-a7af-4b75-b6ae-86150441fbe2": {
"uuid": "95048c23-a7af-4b75-b6ae-86150441fbe2",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"250e5a77-be2d-4d20-9551-d4f723105621"
]
}
},
"250e5a77-be2d-4d20-9551-d4f723105621": {
"uuid": "250e5a77-be2d-4d20-9551-d4f723105621",
"meta": "pop-dialog",
"design": {
"x": 211,
"y": 63,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"closeAll": true
},
"output": {
"complete": [
"32f37033-67af-4c71-bf8f-ac1dead6e150"
]
}
},
"32f37033-67af-4c71-bf8f-ac1dead6e150": {
"uuid": "32f37033-67af-4c71-bf8f-ac1dead6e150",
"meta": "ce2a1072-edd1-42b8-b65a-ca137d1d5fdd",
"design": {
"x": 415,
"y": 80,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"38041cd7-fc6c-4fd1-9aef-bf6f26ea4546"
],
"p1": [
"0fbf93fb-3946-41dd-9d15-9d7e3bb9e489"
]
}
},
"38041cd7-fc6c-4fd1-9aef-bf6f26ea4546": {
"uuid": "38041cd7-fc6c-4fd1-9aef-bf6f26ea4546",
"meta": "dispatch-event",
"design": {
"x": 648,
"y": 24,
"input": {
"default": [
{
"x": 5.5,
"y": 57
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 57
}
]
}
},
"props": {
"eventName": {
"type": "link",
"alias": "successEvent"
}
},
"output": {},
"alias": "派发分享成功事件"
},
"0fbf93fb-3946-41dd-9d15-9d7e3bb9e489": {
"uuid": "0fbf93fb-3946-41dd-9d15-9d7e3bb9e489",
"meta": "13fdecf7-ebc9-4c33-b040-775a34a2eea3",
"design": {
"x": 647,
"y": 177,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"failed": [
"af9f7e73-50cb-4b7e-a5bc-134e81214008"
]
}
},
"af9f7e73-50cb-4b7e-a5bc-134e81214008": {
"uuid": "af9f7e73-50cb-4b7e-a5bc-134e81214008",
"meta": "push-dialog",
"design": {
"x": 860,
"y": 202,
"input": {
"default": [
{
"x": 5.5,
"y": 48.5
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 48.5
}
]
}
},
"props": {
"viewName": {
"type": "link",
"alias": "shareSuccessView"
}
},
"output": {},
"alias": "分享成功弹窗"
}
},
"subEntry": "95048c23-a7af-4b75-b6ae-86150441fbe2",
"metas": [
{
"id": "ce2a1072-edd1-42b8-b65a-ca137d1d5fdd",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "13fdecf7-ebc9-4c33-b040-775a34a2eea3",
"script": " if(global.dataCenter.store.coop_config[\"rpb.lipstick.share.appShareWay\"]==\"true\"||global.dataCenter.store.coop_config[\"rpb.lipstick.share.officalAccountShareWay\"]==\"true\"){\n next(\"success\",args)\n }else{\n next(\"failed\",args)\n }",
"props": {},
"isInline": true,
"from": "custom",
"name": "是否为真分享",
"output": [
"success",
"failed"
]
}
]
}
],
"isPrefab": true,
"id": "do-share",
"group": "prefabs",
"type": "builtin"
}
{
"props": {},
"from": "custom",
"name": "设置分享信息",
"output": [
"success",
"failed"
],
"sub": {
"a75eb5c6-b147-4b19-97eb-a31cf7667fff": {
"uuid": "a75eb5c6-b147-4b19-97eb-a31cf7667fff",
"meta": "entry",
"design": {
"x": -342,
"y": 70,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"e8c7c2d5-fc7e-444a-89f2-252cb8cd6b25"
]
}
},
"2a88bbc9-6d81-43d7-ad1a-a129a9f7e8e6": {
"uuid": "2a88bbc9-6d81-43d7-ad1a-a129a9f7e8e6",
"meta": "api-request",
"design": {
"x": 220,
"y": -99,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 68.5
}
],
"failed": [
{
"x": 124.5,
"y": 82.5
}
],
"exception": [
{
"x": 124.5,
"y": 96.5
}
]
}
},
"props": {
"uri": "lipstick/getShareInfo.do",
"dataName": "getShareInfo",
"params": {
"type": "map",
"value": {}
}
},
"output": {
"success": [
"0cde2623-e145-41ed-bd6c-f313f19adb88"
],
"failed": [
"d5ed77ee-4774-4395-aa4a-60301ba4561f"
],
"exception": [
"d5ed77ee-4774-4395-aa4a-60301ba4561f"
]
}
},
"0cde2623-e145-41ed-bd6c-f313f19adb88": {
"uuid": "0cde2623-e145-41ed-bd6c-f313f19adb88",
"meta": "b283de43-2d3a-4721-965f-90c8a70c5162",
"design": {
"x": 480,
"y": -115,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"8e6024ea-574e-49d0-99f8-13719f7b2c12"
]
}
},
"38471b30-788a-4384-abe3-02961eaa246d": {
"uuid": "38471b30-788a-4384-abe3-02961eaa246d",
"meta": "duiba-api",
"design": {
"x": 231,
"y": 144,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 75.5
}
],
"failed": [
{
"x": 124.5,
"y": 89.5
}
]
}
},
"props": {
"url": {
"type": "static",
"value": "/aaw/projectx/getDevAppInfo"
},
"name": "getDevAppInfo",
"method": "get",
"params": {
"type": "map",
"value": {
"appId": {
"type": "env",
"value": "appID"
}
}
}
},
"output": {
"success": [
"4abafb99-df41-4378-8c4d-37acbc489d5b"
],
"failed": [
"2bc1c4ea-5301-40ab-8dca-d2818c4732e4"
]
}
},
"123fc8e9-6b60-45d5-8e54-4ccfec181619": {
"uuid": "123fc8e9-6b60-45d5-8e54-4ccfec181619",
"meta": "duiba-api",
"design": {
"x": 228,
"y": 310,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 75.5
}
],
"failed": [
{
"x": 124.5,
"y": 89.5
}
]
}
},
"props": {
"url": {
"type": "static",
"value": "/aaw/projectx/getAppWechatInfo"
},
"name": "getAppWechatInfo",
"method": "get",
"params": {
"type": "map",
"value": {
"appId": {
"type": "env",
"value": "appID"
}
}
}
},
"output": {
"failed": [
"2bc1c4ea-5301-40ab-8dca-d2818c4732e4"
]
}
},
"e8c7c2d5-fc7e-444a-89f2-252cb8cd6b25": {
"uuid": "e8c7c2d5-fc7e-444a-89f2-252cb8cd6b25",
"meta": "541c8476-34bf-4c5d-805e-2e4906791cb6",
"design": {
"x": -169,
"y": 100,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"abfd8d40-2ba6-4227-8f71-eb12d4c993a3"
],
"p1": [
"3acb15f0-5e7c-453e-8d74-459b0c27c0cf"
]
}
},
"abfd8d40-2ba6-4227-8f71-eb12d4c993a3": {
"uuid": "abfd8d40-2ba6-4227-8f71-eb12d4c993a3",
"meta": "c4f60371-5a9a-4f02-92c9-1f24d310c68a",
"design": {
"x": 18,
"y": 23,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 33
}
],
"failed": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {},
"output": {
"success": [
"2a88bbc9-6d81-43d7-ad1a-a129a9f7e8e6"
],
"failed": [
"8e6024ea-574e-49d0-99f8-13719f7b2c12"
]
}
},
"3acb15f0-5e7c-453e-8d74-459b0c27c0cf": {
"uuid": "3acb15f0-5e7c-453e-8d74-459b0c27c0cf",
"meta": "63f6956c-1a4f-4395-aeb2-2790b10df37d",
"design": {
"x": 18,
"y": 172,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"yes": [
{
"x": 124.5,
"y": 24.5
}
],
"no": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"yes": [
"38471b30-788a-4384-abe3-02961eaa246d"
],
"no": [
"123fc8e9-6b60-45d5-8e54-4ccfec181619"
]
}
},
"4abafb99-df41-4378-8c4d-37acbc489d5b": {
"uuid": "4abafb99-df41-4378-8c4d-37acbc489d5b",
"meta": "59bb3740-de75-4ef8-b1c0-244103d9b69a",
"design": {
"x": 550,
"y": 226,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {}
},
"props": {},
"output": {}
},
"8e6024ea-574e-49d0-99f8-13719f7b2c12": {
"uuid": "8e6024ea-574e-49d0-99f8-13719f7b2c12",
"meta": "63f6956c-1a4f-4395-aeb2-2790b10df37d",
"design": {
"x": 590,
"y": 71,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"yes": [
{
"x": 124.5,
"y": 24.5
}
],
"no": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"no": [
"971ab334-faeb-4a70-964c-c62f8b97920a"
]
}
},
"d5ed77ee-4774-4395-aa4a-60301ba4561f": {
"uuid": "d5ed77ee-4774-4395-aa4a-60301ba4561f",
"meta": "464fc17d-ab77-4ef7-b6ce-7501a4847d23",
"design": {
"x": 429,
"y": -31,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
},
"2bc1c4ea-5301-40ab-8dca-d2818c4732e4": {
"uuid": "2bc1c4ea-5301-40ab-8dca-d2818c4732e4",
"meta": "464fc17d-ab77-4ef7-b6ce-7501a4847d23",
"design": {
"x": 502,
"y": 314,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
},
"971ab334-faeb-4a70-964c-c62f8b97920a": {
"uuid": "971ab334-faeb-4a70-964c-c62f8b97920a",
"meta": "0fa05fb3-c179-461b-b088-de0e3be40449",
"design": {
"x": 799,
"y": 136,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "a75eb5c6-b147-4b19-97eb-a31cf7667fff",
"metas": [
{
"id": "b283de43-2d3a-4721-965f-90c8a70c5162",
"script": "if(global.dataCenter.store.coop_config[\"rpb.lipstick.share.appShareWay\"]==\"true\"||global.dataCenter.store.coop_config[\"rpb.lipstick.share.officalAccountShareWay\"]==\"true\"){\n if(engine.env.shareUrl.indexOf(\"shareCode\")==-1){\n engine.env.shareUrl+=`&shareCode=${args.raw.shareCode}`\n }\n}\nnext(\"success\",args)",
"props": {},
"isInline": true,
"from": "custom",
"name": "拼接shareCode",
"output": [
"success"
],
"sub": {
"f1fad633-f8eb-4ed4-9c8f-3bc4b470f801": {
"uuid": "f1fad633-f8eb-4ed4-9c8f-3bc4b470f801",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "f1fad633-f8eb-4ed4-9c8f-3bc4b470f801"
},
{
"id": "541c8476-34bf-4c5d-805e-2e4906791cb6",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "c4f60371-5a9a-4f02-92c9-1f24d310c68a",
"script": "if(props.hasShareRequest){\n next(\"success\",args)\n}else{\n next(\"failed\",args)\n}",
"props": {
"hasShareRequest": {
"type": "boolean",
"enum": [],
"default": true,
"alias": "是否配置分享模块"
}
},
"isInline": true,
"from": "custom",
"name": "是否配置分享模块",
"output": [
"success",
"failed"
]
},
{
"id": "63f6956c-1a4f-4395-aeb2-2790b10df37d",
"script": "if(engine.env.channelType==\"1\"){\n next(\"yes\",args)\n}else{\n next(\"no\",args)\n}",
"props": {},
"isInline": true,
"from": "custom",
"name": "是否为app渠道",
"output": [
"yes",
"no"
]
},
{
"id": "59bb3740-de75-4ef8-b1c0-244103d9b69a",
"script": "if(!global.loginCodeState){\n global.loginCodeState=1\n window[\"$\"](\"body\").append(args.appLoginJs)\n var u = navigator.userAgent;\n var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端\n if(isAndroid){\n window[\"$\"](\"body\").append(args.androidShareJs)\n }else{\n window[\"$\"](\"body\").append(args.iosShareJs)\n }\n}",
"props": {},
"isInline": true,
"from": "custom",
"name": "生成分享方法",
"output": []
},
{
"id": "464fc17d-ab77-4ef7-b6ce-7501a4847d23",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "接口异常Toast",
"output": [
"success",
"failed"
],
"sub": {
"557c28e1-568b-49cf-a145-c48f9f180ab8": {
"uuid": "557c28e1-568b-49cf-a145-c48f9f180ab8",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"4baae08e-0691-4a65-8e3f-6460d1547a15"
]
}
},
"4baae08e-0691-4a65-8e3f-6460d1547a15": {
"uuid": "4baae08e-0691-4a65-8e3f-6460d1547a15",
"meta": "974da71f-8a91-495f-be6c-8e521dd82df4",
"design": {
"x": 230,
"y": 82,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"failed": [
"fc8aab82-772f-4d76-813a-0bec9b3e0760"
]
}
},
"fc8aab82-772f-4d76-813a-0bec9b3e0760": {
"uuid": "fc8aab82-772f-4d76-813a-0bec9b3e0760",
"meta": "9e196854-4c2d-4784-afc8-e8dcb17c79c2",
"design": {
"x": 412,
"y": 164,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"efe82744-e381-4cdc-964d-651f516545a4"
],
"p1": [
"197e1d2f-21e6-4568-b0f7-4b8405ad6e9b"
]
}
},
"efe82744-e381-4cdc-964d-651f516545a4": {
"uuid": "efe82744-e381-4cdc-964d-651f516545a4",
"meta": "show-toast",
"design": {
"x": 657,
"y": 131,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 82.5
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200,
"viewName": ""
},
"output": {}
},
"197e1d2f-21e6-4568-b0f7-4b8405ad6e9b": {
"uuid": "197e1d2f-21e6-4568-b0f7-4b8405ad6e9b",
"meta": "wait",
"design": {
"x": 654,
"y": 363,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"duration": 1000
},
"output": {
"complete": [
"cc6a31a2-cf54-4397-aca0-e17f9c19b441"
]
}
},
"cc6a31a2-cf54-4397-aca0-e17f9c19b441": {
"uuid": "cc6a31a2-cf54-4397-aca0-e17f9c19b441",
"meta": "990b7cff-5817-484c-8b96-57a1fc194676",
"design": {
"x": 869,
"y": 376,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "557c28e1-568b-49cf-a145-c48f9f180ab8",
"metas": [
{
"id": "974da71f-8a91-495f-be6c-8e521dd82df4",
"script": "console.log(args)\nif(!args){\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n}else{\n if(args.message){\n if(args.code!='100001'){\n next(\"failed\",{text:args.message})\n }\n }else{\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n }\n}\n\n",
"props": {},
"isInline": true,
"from": "custom",
"name": "判错逻辑",
"output": [
"success",
"failed"
]
},
{
"id": "9e196854-4c2d-4784-afc8-e8dcb17c79c2",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "990b7cff-5817-484c-8b96-57a1fc194676",
"script": "next(\"success\")",
"props": {},
"isInline": true,
"from": "custom",
"name": "结束",
"output": [
"success"
]
}
]
},
{
"id": "0fa05fb3-c179-461b-b088-de0e3be40449",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "初始化微信分享",
"output": [
"success",
"failed"
],
"sub": {
"f48cbb42-5672-4ea2-9329-3b1c7c448621": {
"uuid": "f48cbb42-5672-4ea2-9329-3b1c7c448621",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"85c9cf91-f94d-4be2-a776-6ce88a5e8733"
]
}
},
"85c9cf91-f94d-4be2-a776-6ce88a5e8733": {
"uuid": "85c9cf91-f94d-4be2-a776-6ce88a5e8733",
"meta": "init-weixin-env",
"design": {
"x": 253,
"y": 72,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"debug": false
},
"output": {
"success": [
"ac5445fa-dbd9-4610-9cd4-6ce7f2b2d826"
]
}
},
"ac5445fa-dbd9-4610-9cd4-6ce7f2b2d826": {
"uuid": "ac5445fa-dbd9-4610-9cd4-6ce7f2b2d826",
"meta": "78e53207-b558-4344-8385-e8df8eba6bfe",
"design": {
"x": 529,
"y": 140,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 33
}
],
"failed": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"update": true
},
"output": {}
}
},
"subEntry": "f48cbb42-5672-4ea2-9329-3b1c7c448621",
"metas": [
{
"id": "78e53207-b558-4344-8385-e8df8eba6bfe",
"script": "",
"props": {
"update": {
"type": "boolean",
"enum": []
}
},
"isInline": true,
"from": "custom",
"name": "微信分享操作",
"output": [
"success",
"failed"
],
"sub": {
"608177d2-eb20-4334-b718-205144d60c48": {
"uuid": "608177d2-eb20-4334-b718-205144d60c48",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"0bdc725d-a906-4b3a-ab43-53c0f75b9221"
]
}
},
"0bdc725d-a906-4b3a-ab43-53c0f75b9221": {
"uuid": "0bdc725d-a906-4b3a-ab43-53c0f75b9221",
"meta": "share-preprocessing",
"design": {
"x": 201,
"y": 51,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"ee4390b8-ae46-4000-b139-c6060d1f1316"
]
}
},
"ee4390b8-ae46-4000-b139-c6060d1f1316": {
"uuid": "ee4390b8-ae46-4000-b139-c6060d1f1316",
"meta": "env-judge",
"design": {
"x": 419,
"y": 93,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"1503216d-be13-484c-92f3-d8168f076674"
]
}
},
"1503216d-be13-484c-92f3-d8168f076674": {
"uuid": "1503216d-be13-484c-92f3-d8168f076674",
"meta": "share-weixin",
"design": {
"x": 651,
"y": 95,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 19
}
],
"failed": [
{
"x": 124.5,
"y": 33
}
],
"pass": [
{
"x": 124.5,
"y": 47
}
],
"guide": [
{
"x": 124.5,
"y": 61
}
]
}
},
"props": {
"update": {
"type": "link"
}
},
"output": {}
}
},
"subEntry": "608177d2-eb20-4334-b718-205144d60c48"
}
]
}
],
"isPrefab": true,
"id": "init-share",
"group": "prefabs",
"type": "builtin"
}
{
"name": "获取星速台Token",
"props": {
"comment": {
"type": "string",
"alias": "星速台通用token"
}
},
"output": [
"success",
"failed",
"invalid",
"error"
],
"id": "px-token",
"script": "if (window['getPxToken']) {\n window['getPxToken'](function (e, token) {\n switch (e) {\n case 'net error':\n next('error', { type: 'error' });\n break;\n case 'need login':\n next('failed', { type: 'failed' });\n break;\n case 'state invalid':\n next('invalid', { type: 'invalid' });\n break;\n default:\n if (token) {\n scope.token = token;\n next('success', args);\n }\n else {\n next('invalid', { type: 'invalid key' });\n }\n }\n });\n}\nelse {\n next('error', { type: 'no ready' });\n}\n",
"group": "projectX",
"type": "builtin"
}
...@@ -13,10 +13,11 @@ ...@@ -13,10 +13,11 @@
} }
}, },
"output": [ "output": [
"complete" "complete",
"exception"
], ],
"id": "pop-scene", "id": "pop-scene",
"script": "if (props.closeAll) {\n if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n }\n else {\n var gameStage = engine.gameStage;\n var viewConfig = gameStage.getViewConfigByName(props.viewName);\n if (viewConfig) {\n var view = engine.instantiate(viewConfig);\n gameStage.sceneContainer.push(view);\n }\n else {\n console.error('view config not exists');\n }\n next('complete');\n }\n}\nelse {\n engine.gameStage.sceneContainer.pop();\n next('complete');\n}\n", "script": "if (props.popAll) {\n if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n }\n else {\n var gameStage = engine.gameStage;\n var view = gameStage.instantiateView(props.viewName);\n if (view) {\n gameStage.sceneContainer.popAll(view);\n next('complete');\n }\n else {\n next('exception', '视图不存在');\n }\n }\n}\nelse {\n engine.gameStage.sceneContainer.pop();\n next('complete');\n}\n",
"group": "view", "group": "view",
"type": "builtin" "type": "builtin"
} }
...@@ -46,5 +46,5 @@ ...@@ -46,5 +46,5 @@
} }
}, },
"id": "buried-point", "id": "buried-point",
"code": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BuriedPoint = (function (_super) {\n __extends(BuriedPoint, _super);\n function BuriedPoint() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dpm = 'appID.0.0.0';\n _this.dcm = '202.projectID.0.0';\n _this.dom = '0.0.0.0';\n _this.autoExposure = true;\n _this.onceAutoExposure = false;\n _this.autoExposureType = 'visible';\n _this.autoClick = true;\n _this.checkFps = 5;\n _this._autoExposured = false;\n _this._hostVisible = false;\n _this.checkVisibility = function () {\n var worldVisible = _this.host.worldVisible;\n if (worldVisible !== _this._hostVisible) {\n _this._hostVisible = worldVisible;\n if (worldVisible) {\n _this._onVisible();\n }\n }\n };\n return _this;\n }\n BuriedPoint.prototype.onModify = function (value, key, oldValue) {\n switch (key) {\n case 'dpm':\n case 'dcm':\n case 'dom':\n this['__' + key] = fill(value);\n break;\n }\n };\n BuriedPoint.prototype.mounted = function () {\n this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this);\n setInterval(this.checkVisibility, 1000 / this.checkFps);\n };\n BuriedPoint.prototype.awake = function () {\n if (this.autoExposure && this.autoExposureType === 'awake') {\n this.autoLogExposure();\n }\n };\n BuriedPoint.prototype._onVisible = function (e) {\n if (e === void 0) { e = null; }\n if (this.autoExposure && this.autoExposureType === 'visible') {\n this.autoLogExposure();\n }\n };\n BuriedPoint.prototype.autoLogExposure = function () {\n if (!this._autoExposured) {\n if (this.onceAutoExposure) {\n this._autoExposured = true;\n }\n this.logExposure();\n }\n };\n BuriedPoint.prototype._onClick = function (e) {\n if (this.autoClick) {\n this.logClick();\n }\n };\n BuriedPoint.prototype.logExposure = function () {\n this.log('exposure');\n };\n BuriedPoint.prototype.logClick = function () {\n this.log('click');\n };\n BuriedPoint.prototype.log = function (type) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, log(type, {\n dpm: this['__dpm'],\n dcm: this['__dcm'],\n dom: this['__dom'],\n })];\n case 1:\n _a.sent();\n if (this.id !== undefined) {\n engine.globalEvent.dispatchEvent('buried-point-success', {\n type: type,\n id: this.id,\n });\n }\n return [2];\n }\n });\n });\n };\n BuriedPoint.id = 'buried-point';\n __decorate([\n engine.dirtyFieldTrigger\n ], BuriedPoint.prototype, \"dpm\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], BuriedPoint.prototype, \"dcm\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], BuriedPoint.prototype, \"dom\", void 0);\n return BuriedPoint;\n}(engine.ScriptBase));\nexports.default = BuriedPoint;\nfunction fill(src) {\n var result = src;\n for (var key in engine.env) {\n result = result.replace(key, engine.env[key]);\n }\n return result;\n}\nfunction log(type, data) {\n var dpm = data.dpm, dcm = data.dcm, dom = data.dom;\n var params = {\n dpm: dpm, dcm: dcm, appId: engine.env.appID\n };\n if (dom !== '0.0.0.0') {\n params.dom = dom;\n }\n var isExposure = type === 'exposure';\n return engine.httpRequest(isExposure ? '//embedlog.duiba.com.cn/exposure/standard' : '/log/click', 'get', params, isExposure ? 'jsonp' : 'text');\n}\n" "code": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BuriedPoint = (function (_super) {\n __extends(BuriedPoint, _super);\n function BuriedPoint() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dpm = 'appID.0.0.0';\n _this.dcm = '202.projectID.0.0';\n _this.dom = '0.0.0.0';\n _this.autoExposure = true;\n _this.onceAutoExposure = false;\n _this.autoExposureType = 'visible';\n _this.autoClick = true;\n _this.checkFps = 5;\n _this._autoExposured = false;\n _this._hostVisible = false;\n _this.checkVisibility = function () {\n var worldVisible = _this.host.worldVisible;\n if (worldVisible !== _this._hostVisible) {\n _this._hostVisible = worldVisible;\n if (worldVisible) {\n _this._onVisible();\n }\n }\n };\n return _this;\n }\n BuriedPoint.prototype.onModify = function (value, key, oldValue) {\n switch (key) {\n case 'dpm':\n case 'dcm':\n case 'dom':\n this['__' + key] = fill(value);\n break;\n }\n };\n BuriedPoint.prototype.mounted = function () {\n this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this);\n this._timer = setInterval(this.checkVisibility, 1000 / this.checkFps);\n };\n BuriedPoint.prototype.destroy = function () {\n this.host.removeEventListener(engine.MouseEvent.CLICK, this._onClick, this);\n if (this._timer) {\n clearInterval(this._timer);\n this._timer = null;\n }\n };\n BuriedPoint.prototype.awake = function () {\n if (this.autoExposure && this.autoExposureType === 'awake') {\n this.autoLogExposure();\n }\n };\n BuriedPoint.prototype._onVisible = function (e) {\n if (e === void 0) { e = null; }\n if (this.autoExposure && this.autoExposureType === 'visible') {\n this.autoLogExposure();\n }\n };\n BuriedPoint.prototype.autoLogExposure = function () {\n if (!this._autoExposured) {\n if (this.onceAutoExposure) {\n this._autoExposured = true;\n }\n this.logExposure();\n }\n };\n BuriedPoint.prototype._onClick = function (e) {\n if (this.autoClick) {\n this.logClick();\n }\n };\n BuriedPoint.prototype.logExposure = function () {\n this.log('exposure');\n };\n BuriedPoint.prototype.logClick = function () {\n this.log('click');\n };\n BuriedPoint.prototype.log = function (type) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4, log(type, {\n dpm: this['__dpm'],\n dcm: this['__dcm'],\n dom: this['__dom'],\n })];\n case 1:\n _a.sent();\n if (this.id !== undefined) {\n engine.globalEvent.dispatchEvent('buried-point-success', {\n type: type,\n id: this.id,\n });\n }\n return [2];\n }\n });\n });\n };\n BuriedPoint.id = 'buried-point';\n __decorate([\n engine.dirtyFieldTrigger\n ], BuriedPoint.prototype, \"dpm\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], BuriedPoint.prototype, \"dcm\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], BuriedPoint.prototype, \"dom\", void 0);\n return BuriedPoint;\n}(engine.ScriptBase));\nexports.default = BuriedPoint;\nfunction fill(src) {\n var result = src;\n for (var key in engine.env) {\n result = result.replace(key, engine.env[key]);\n }\n return result;\n}\nfunction log(type, data) {\n var dpm = data.dpm, dcm = data.dcm, dom = data.dom;\n var params = {\n dpm: dpm, dcm: dcm, appId: engine.env.appID\n };\n if (dom !== '0.0.0.0') {\n params.dom = dom;\n }\n var isExposure = type === 'exposure';\n return engine.httpRequest(isExposure ? '//embedlog.duiba.com.cn/exposure/standard' : '/log/click', 'get', params, isExposure ? 'jsonp' : 'text');\n}\n"
} }
{ {
"name": "缩放滚动", "name": "缩放滚动",
"props": { "props": {
"autoInit": {
"alias": "自动初始化",
"type": "boolean",
"default": true
},
"duration": { "duration": {
"alias": "时间", "alias": "时间",
"type": "number", "type": "number",
...@@ -43,5 +48,5 @@ ...@@ -43,5 +48,5 @@
} }
}, },
"id": "zoom-scroll", "id": "zoom-scroll",
"code": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ZoomScroll = (function (_super) {\n __extends(ZoomScroll, _super);\n function ZoomScroll() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.duration = 1000;\n _this.index = 0;\n _this.itemWidth = 0;\n _this.itemHeight = 0;\n _this.scaleMin = 0.7;\n _this.scaleMax = 1;\n _this.alphaOut = 0.5;\n _this.alphaIn = 1;\n _this._startDragOffset = { x: 0, y: 0 };\n _this._dragOffset = { x: 0, y: 0 };\n return _this;\n }\n ZoomScroll.prototype.mounted = function () {\n this._centerOffset = this.host.width / 2;\n this.init();\n this.host.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDragStart, this);\n };\n ZoomScroll.prototype.sleep = function () {\n };\n ZoomScroll.prototype.update = function (t) {\n };\n ZoomScroll.prototype.init = function () {\n for (var i = 0, li = this.host.children.length; i < li; i++) {\n var child = this.host.children[i];\n child.anchorX = child.width / 2;\n child.anchorY = child.height / 2;\n child.x = child.ix = i * this.itemWidth + this._centerOffset - this.itemWidth / 2;\n }\n this.scrollTo(0, false);\n };\n ZoomScroll.prototype.updateOffset = function (offset) {\n this._dragOffset.x = this._startDragOffset.x + offset.x;\n for (var i = 0, li = this.host.children.length; i < li; i++) {\n var child = this.host.children[i];\n var x = child.x = child.ix + this._dragOffset.x;\n var s = 40 / Math.abs(x - this._centerOffset + this.itemWidth / 2);\n child.scaleX = child.scaleY = x === 0 ? 1 : Math.min(s + this.scaleMin, this.scaleMax);\n child.alpha = x === 0 ? 1 : Math.min(s + this.alphaOut, this.alphaIn);\n }\n };\n ZoomScroll.prototype.onDragStart = function (event) {\n this.host.stage.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onDraging, this);\n this.host.stage.addEventListener(engine.MouseEvent.MOUSE_UP, this.onDragEnd, this);\n this._startDragPos = {\n x: event.stageX,\n y: event.stageY,\n };\n this._startDragOffset.x = this._dragOffset.x;\n this._startDragOffset.y = this._dragOffset.y;\n };\n ZoomScroll.prototype.onDraging = function (event) {\n if (!this._startDragPos) {\n return;\n }\n var _a = this._startDragPos, x = _a.x, y = _a.y;\n var stageX = event.stageX, stageY = event.stageY;\n var offset = {\n x: stageX - x,\n y: stageY - y,\n };\n this.updateOffset(offset);\n };\n ZoomScroll.prototype.onDragEnd = function (event) {\n this.host.stage.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onDraging, this);\n this.host.stage.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onDragEnd, this);\n if (!this._startDragPos) {\n return;\n }\n this._startDragOffset.x = 0;\n this._startDragOffset.y = 0;\n var index = Math.round(this._dragOffset.x / this.itemWidth);\n index = -Math.min(0, Math.max(1 - this.host.children.length, index));\n this['_index'] = index;\n this.scrollTo(index);\n this._startDragPos = null;\n };\n Object.defineProperty(ZoomScroll.prototype, \"t\", {\n get: function () {\n return this._dragOffset.x;\n },\n set: function (v) {\n this.updateOffset({ x: v, y: 0 });\n },\n enumerable: true,\n configurable: true\n });\n ZoomScroll.prototype.scrollTo = function (index, animation) {\n if (animation === void 0) { animation = true; }\n var indexPos = -index * this.itemWidth;\n if (animation) {\n engine.Tween.get(this, null, null, true)\n .to({ t: indexPos }, 100, engine.Ease.cubicOut);\n }\n else {\n this.t = indexPos;\n }\n };\n ZoomScroll.prototype.onModify = function (value, key, oldValue) {\n var _this = this;\n switch (key) {\n case 'index':\n var index_1 = value;\n if (oldValue !== undefined) {\n index_1 = Math.max(0, Math.min(this.host.children.length - 1, value));\n this['_index'] = index_1;\n }\n setTimeout(function () {\n _this.scrollTo(index_1, oldValue !== undefined);\n });\n break;\n }\n };\n ZoomScroll.id = 'zoom-scroll';\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"index\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"itemWidth\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"itemHeight\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"scaleMin\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"scaleMax\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"alphaOut\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"alphaIn\", void 0);\n return ZoomScroll;\n}(engine.ScriptBase));\nexports.default = ZoomScroll;\n" "code": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ZoomScroll = (function (_super) {\n __extends(ZoomScroll, _super);\n function ZoomScroll() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.autoInit = true;\n _this.duration = 1000;\n _this.index = 0;\n _this.itemWidth = 0;\n _this.itemHeight = 0;\n _this.scaleMin = 0.7;\n _this.scaleMax = 1;\n _this.alphaOut = 0.5;\n _this.alphaIn = 1;\n _this._startDragOffset = { x: 0, y: 0 };\n _this._dragOffset = { x: 0, y: 0 };\n return _this;\n }\n ZoomScroll.prototype.mounted = function () {\n this._centerOffset = this.host.width / 2;\n if (this.autoInit) {\n this.init();\n }\n };\n ZoomScroll.prototype.sleep = function () {\n };\n ZoomScroll.prototype.update = function (t) {\n };\n ZoomScroll.prototype.init = function () {\n for (var i = 0, li = this.host.children.length; i < li; i++) {\n var child = this.host.children[i];\n child.anchorX = child.width / 2;\n child.anchorY = child.height / 2;\n child.x = child.ix = i * this.itemWidth + this._centerOffset - this.itemWidth / 2;\n }\n this.scrollTo(0, false);\n this.host.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDragStart, this);\n };\n ZoomScroll.prototype.updateOffset = function (offset) {\n this._dragOffset.x = this._startDragOffset.x + offset.x;\n for (var i = 0, li = this.host.children.length; i < li; i++) {\n var child = this.host.children[i];\n var x = child.x = child.ix + this._dragOffset.x;\n var s = 40 / Math.abs(x - this._centerOffset + this.itemWidth / 2);\n child.scaleX = child.scaleY = x === 0 ? 1 : Math.min(s + this.scaleMin, this.scaleMax);\n child.alpha = x === 0 ? 1 : Math.min(s + this.alphaOut, this.alphaIn);\n }\n };\n ZoomScroll.prototype.onDragStart = function (event) {\n this.host.stage.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onDraging, this);\n this.host.stage.addEventListener(engine.MouseEvent.MOUSE_UP, this.onDragEnd, this);\n this._startDragPos = {\n x: event.stageX,\n y: event.stageY,\n };\n this._startDragOffset.x = this._dragOffset.x;\n this._startDragOffset.y = this._dragOffset.y;\n };\n ZoomScroll.prototype.onDraging = function (event) {\n if (!this._startDragPos) {\n return;\n }\n var _a = this._startDragPos, x = _a.x, y = _a.y;\n var stageX = event.stageX, stageY = event.stageY;\n var offset = {\n x: stageX - x,\n y: stageY - y,\n };\n this.updateOffset(offset);\n };\n ZoomScroll.prototype.onDragEnd = function (event) {\n this.host.stage.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onDraging, this);\n this.host.stage.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onDragEnd, this);\n if (!this._startDragPos) {\n return;\n }\n this._startDragOffset.x = 0;\n this._startDragOffset.y = 0;\n var index = Math.round(this._dragOffset.x / this.itemWidth);\n index = -Math.min(0, Math.max(1 - this.host.children.length, index));\n this['_index'] = index;\n this.scrollTo(index);\n this._startDragPos = null;\n };\n Object.defineProperty(ZoomScroll.prototype, \"t\", {\n get: function () {\n return this._dragOffset.x;\n },\n set: function (v) {\n this.updateOffset({ x: v, y: 0 });\n },\n enumerable: true,\n configurable: true\n });\n ZoomScroll.prototype.scrollTo = function (index, animation) {\n if (animation === void 0) { animation = true; }\n var indexPos = -index * this.itemWidth;\n if (animation) {\n engine.Tween.get(this, null, null, true)\n .to({ t: indexPos }, 100, engine.Ease.cubicOut);\n }\n else {\n this.t = indexPos;\n }\n };\n ZoomScroll.prototype.onModify = function (value, key, oldValue) {\n var _this = this;\n switch (key) {\n case 'index':\n var index_1 = value;\n if (oldValue !== undefined) {\n index_1 = Math.max(0, Math.min(this.host.children.length - 1, value));\n this['_index'] = index_1;\n }\n setTimeout(function () {\n _this.scrollTo(index_1, oldValue !== undefined);\n });\n break;\n }\n };\n ZoomScroll.id = 'zoom-scroll';\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"index\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"itemWidth\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"itemHeight\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"scaleMin\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"scaleMax\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"alphaOut\", void 0);\n __decorate([\n engine.dirtyFieldTrigger\n ], ZoomScroll.prototype, \"alphaIn\", void 0);\n return ZoomScroll;\n}(engine.ScriptBase));\nexports.default = ZoomScroll;\n"
} }
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var props_1 = require("../props");
var utils_1 = require("./utils");
var ObjectPool = engine.ObjectPool;
var object_pool_init_1 = require("./object-pool-init");
var GameView = (function (_super) {
__extends(GameView, _super);
function GameView() {
var _this = _super.call(this) || this;
_this.goodsItems = [];
_this.moveCatchX = 0;
_this.playerCatchX = 0;
_this.onDownStage = function (e) {
_this.moveCatchX = e.localX;
_this.playerCatchX = _this.player.x;
};
_this.onMoveStage = function (e) {
if (_this.gameIng) {
_this.player.x = _this.playerCatchX + (e.localX - _this.moveCatchX);
}
};
_this.onOutStage = function (e) {
_this.moveCatchX = 0;
};
_this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);
return _this;
}
GameView.prototype.setup = function () {
var _this = this;
if (this._hasSetup) {
return;
}
this._hasSetup = true;
this.NpcBg = new engine.Container();
this.NpcBg.alpha = 1;
this.NpcBg.width = 0;
this.NpcBg.height = 0;
this.addChild(this.NpcBg);
this.player = new engine.Container();
this.player.mouseEnabled = false;
this.addChild(this.player);
this.waterSvga = utils_1.createSvga("水花");
this.playerSvga = utils_1.createSvga("玩家");
this.boomSvga = utils_1.createSvga("炸弹svga");
this.player.addChild(this.playerSvga);
this.player.addChild(this.waterSvga);
this.player.addChild(this.boomSvga);
this.playerSvga.gotoAndPlay(1);
this.visible = false;
setTimeout(function () {
_this.visible = true;
_this.player.anchorY = _this.player.height / 2;
_this.player.anchorX = _this.player.width / 2;
console.log(_this.player.width);
console.log(_this.playerSvga.width);
_this.player.x = 375 - _this.player.width / 2;
_this.player.y = props_1.props.playerPositionY;
}, 300);
this.rectBg = new engine.Rect();
this.rectBg.alpha = 0;
this.rectBg.width = 750;
this.rectBg.height = 1624;
this.addChild(this.rectBg);
this.rectBg.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDownStage, this);
this.rectBg.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onMoveStage, this);
this.rectBg.addEventListener(engine.MouseEvent.MOUSE_OUT, this.onOutStage, this);
};
GameView.prototype.reset = function () {
this.recycleGoods();
};
GameView.prototype.start = function () {
var _this = this;
this.score = 0;
this.speed = 1;
this.gameIng = true;
this.creatNpc();
this.beginNpc();
this.countdown = props_1.props.countDown;
this.countdownTimer = setInterval(function () {
if (_this.gameIng) {
if (_this.countdown > 0) {
engine.globalEvent.dispatchEvent('food-fell-time-update', {
time: _this.countdown,
});
_this.countdown -= 1;
}
else {
engine.globalEvent.dispatchEvent('food-fell-game-over', {
score: _this.score,
reason: 1
});
_this.died();
}
}
}, 1000);
};
GameView.prototype.beginNpc = function () {
var _this = this;
this.timer = setTimeout(function () {
if (_this.gameIng) {
_this.speed += props_1.props.acceleratedSpeed;
_this.creatNpc();
}
_this.beginNpc();
}, 2000 / this.speed);
};
GameView.prototype.pause = function () {
this.gameIng = false;
};
GameView.prototype.revive = function () {
this.gameIng = true;
};
GameView.prototype.resume = function () {
this.reset();
this.start();
};
GameView.prototype.creatNpc = function () {
var _this = this;
var goods = this._goods = ObjectPool.getObject(object_pool_init_1.PoolName);
this.goodsItems.push(goods);
this.NpcBg.addChild(goods);
goods.addEventListener(engine.Event.ENTER_FRAME, goods["onGoodsEnter"] = function () {
if (goods.y > 1624) {
_this.removeNpc(goods);
}
else {
if (_this.gameIng) {
goods.y += (4 * _this.speed);
if (_this.hasHit(_this.player, goods)) {
if (goods["npcType"] == "rain") {
console.log("碰到雨滴");
_this.score += props_1.props.rainScore;
_this.waterSvga.visible = true;
_this.waterSvga.play(false, false);
_this.waterSvga.once(engine.Event.END_FRAME, function () {
_this.waterSvga.visible = false;
}, _this);
}
else if (goods["npcType"] == "stone") {
console.log("碰到石头");
_this.score += props_1.props.stoneScore;
}
else if (goods["npcType"] == "boom") {
console.log("碰到炸弹");
_this.boomSvga.visible = true;
_this.boomSvga.play(false, false);
_this.boomSvga.once(engine.Event.END_FRAME, function () {
_this.boomSvga.visible = false;
}, _this);
engine.globalEvent.dispatchEvent('food-fell-game-over', {
score: _this.score,
reason: 2
});
_this.died();
}
engine.globalEvent.dispatchEvent('food-fell-score-update', {
score: _this.score,
});
_this.removeNpc(goods);
}
}
}
}, this);
};
GameView.prototype.died = function () {
this.score = 0;
this.pause();
};
GameView.prototype.removeNpc = function (goods) {
this.NpcBg.removeChild(goods);
ObjectPool.recycleObject(object_pool_init_1.PoolName, goods);
goods.removeEventListener(engine.Event.ENTER_FRAME, goods["onGoodsEnter"], this);
var index = this.goodsItems.indexOf(goods);
if (index > -1) {
this.goodsItems.splice(index, 1);
}
};
GameView.prototype.recycleGoods = function () {
clearTimeout(this.timer);
clearInterval(this.countdownTimer);
for (var _i = 0, _a = this.goodsItems; _i < _a.length; _i++) {
var goods = _a[_i];
if (goods) {
this.removeChild(goods);
ObjectPool.recycleObject(object_pool_init_1.PoolName, goods);
goods.removeEventListener(engine.Event.ENTER_FRAME, goods["onGoodsEnter"], this);
}
}
this.goodsItems = [];
};
GameView.prototype.hasHit = function (a, b) {
if (Math.abs((a.x + a.width / 2) - (b.x + b.width / 2)) < a.width / 2 + b.width / 2
&&
Math.abs((a.y + a.height / 2) - (b.y + b.height / 2)) < a.height / 2 + b.height / 2) {
return true;
}
else {
return false;
}
};
return GameView;
}(engine.Container));
exports.default = GameView;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GameView_1 = require("./GameView");
var props_1 = require("../props");
var GameWrapper = (function (_super) {
__extends(GameWrapper, _super);
function GameWrapper() {
var _this = _super.call(this) || this;
engine.globalEvent.addEventListener('food-fell-reset', _this.reset, _this);
engine.globalEvent.addEventListener('food-fell-start', _this.start, _this);
engine.globalEvent.addEventListener('food-fell-pause', _this.pause, _this);
engine.globalEvent.addEventListener('food-fell-resume', _this.resume, _this);
engine.globalEvent.addEventListener('food-fell-revive', _this.revive, _this);
engine.globalEvent.addEventListener('food-fell-clear', _this.clear, _this);
_this.addEventListener(engine.MouseEvent.CLICK, _this.onTap, _this);
var gameView = _this._gameView = new GameView_1.default();
_this.addChild(gameView);
return _this;
}
GameWrapper.prototype.reset = function (event) {
props_1.injectProps(event.data);
this._gameView.visible = true;
this._gameView.reset();
};
GameWrapper.prototype.start = function (event) {
props_1.injectProps(event.data);
this._status = 1;
this._gameView.start();
};
GameWrapper.prototype.pause = function () {
this._gameView.pause();
};
GameWrapper.prototype.resume = function () {
this._gameView.resume();
};
GameWrapper.prototype.revive = function () {
this._gameView.revive();
};
GameWrapper.prototype.clear = function () {
this._gameView.visible = false;
};
GameWrapper.prototype.onTap = function (event) {
};
return GameWrapper;
}(engine.Container));
exports.GameWrapper = GameWrapper;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./utils");
var props_1 = require("../props");
var Goods = (function (_super) {
__extends(Goods, _super);
function Goods() {
var _this = _super.call(this) || this;
var body;
body = _this._body = new engine.Rect();
var rain = new engine.Sprite(utils_1.getTextureByName('雨滴'));
rain["npcType"] = "rain";
var stone = new engine.Sprite(utils_1.getTextureByName('石块'));
stone["npcType"] = "stone";
var boom = new engine.Sprite(utils_1.getTextureByName('炸弹'));
boom["npcType"] = "boom";
rain.visible = false;
stone.visible = false;
boom.visible = false;
body.addChild(rain);
body.addChild(stone);
body.addChild(boom);
_this.addChild(body);
body.width = .0001;
body.height = .0001;
body.mouseEnabled = false;
return _this;
}
Goods.prototype.getRandomNumberByRange = function (start, end) {
return Math.floor(Math.random() * (end - start) + start);
};
Goods.prototype.reset = function () {
this.visible = true;
this.rotation = 0;
this.anchorOffsetY = 0;
this.y = 0;
this.x = (750 - 120) * Math.random() + 30;
this.rotation = 0;
var random = Math.random();
if (random < props_1.props.goodsProbability[0]) {
this.showNpc("rain");
}
else if (random >= props_1.props.goodsProbability[0] && random <= (props_1.props.goodsProbability[0] + props_1.props.goodsProbability[1])) {
this.showNpc("stone");
}
else if (random > (props_1.props.goodsProbability[0] + props_1.props.goodsProbability[1])) {
this.showNpc("boom");
}
};
Goods.prototype.showNpc = function (type) {
for (var i = 0; i < this._body.children.length; i++) {
this._body.children[i].visible = false;
this._body.children[i].mouseEnabled = false;
}
for (var i = 0; i < this._body.children.length; i++) {
if (this._body.children[i]["npcType"] == type) {
this["npcType"] = type;
this._body.children[i].visible = true;
this._body.children[i].mouseEnabled = false;
}
}
};
Object.defineProperty(Goods.prototype, "anchorOffsetY", {
set: function (v) {
this._body.y = v;
},
enumerable: true,
configurable: true
});
return Goods;
}(engine.Container));
exports.Goods = Goods;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Goods_1 = require("./Goods");
var ObjectPool = engine.ObjectPool;
exports.PoolName = 'goods';
ObjectPool.registerPool(exports.PoolName, function () {
return new Goods_1.Goods();
}, function (item, data) {
item.reset();
});
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
}
exports.getTexture = getTexture;
function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid);
}
exports.getTextureByName = getTextureByName;
function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, { keep: true });
}
exports.playSound = playSound;
function createSvga(name, anchorName) {
var inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid;
return inst;
}
exports.createSvga = createSvga;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var GameWrapper_1 = require("./game/GameWrapper");
var props_1 = require("./props");
function default_1(props) {
props_1.prepareProps();
props_1.injectProps(props);
var instance = new GameWrapper_1.GameWrapper();
return instance;
}
exports.default = default_1;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.props = {};
function prepareProps() {
var metaProps = getProps();
engine.injectProp(exports.props, metaProps);
}
exports.prepareProps = prepareProps;
function injectProps(p) {
engine.injectProp(exports.props, p);
}
exports.injectProps = injectProps;
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
var props_1 = require("../props"); var props_1 = require("../props");
function getTexture(uuid) { function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid); return engine.Texture.from(uuid);
} }
exports.getTexture = getTexture; exports.getTexture = getTexture;
function getTextureByName(name) { function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid); return getTexture(getAssetByName(name).uuid);
} }
exports.getTextureByName = getTextureByName; exports.getTextureByName = getTextureByName;
function getBlockAsset(type) { function getBlockAsset(type) {
...@@ -15,8 +15,8 @@ function getBlockAsset(type) { ...@@ -15,8 +15,8 @@ function getBlockAsset(type) {
exports.getBlockAsset = getBlockAsset; exports.getBlockAsset = getBlockAsset;
function createSvga(name, anchorName) { function createSvga(name, anchorName) {
var inst = new svga.Svga(); var inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid; inst.source = 'asset://' + getAssetByName(name).uuid;
var anchor = props_1.props[(anchorName)]; var anchor = props_1.props[anchorName];
if (anchor) { if (anchor) {
inst.x = -anchor.x; inst.x = -anchor.x;
inst.y = -anchor.y; inst.y = -anchor.y;
...@@ -27,6 +27,6 @@ function createSvga(name, anchorName) { ...@@ -27,6 +27,6 @@ function createSvga(name, anchorName) {
} }
exports.createSvga = createSvga; exports.createSvga = createSvga;
function playSound(name) { function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, { keep: true }); engine.playSound(getAssetByName(name).uuid, { keep: true });
} }
exports.playSound = playSound; exports.playSound = playSound;
...@@ -24,7 +24,7 @@ var GuideMask = (function (_super) { ...@@ -24,7 +24,7 @@ var GuideMask = (function (_super) {
var alpha = 0.7; var alpha = 0.7;
var top = new engine.Shape(); var top = new engine.Shape();
top.beginFill(color, alpha); top.beginFill(color, alpha);
top.drawRect(0, 0, sw, y); top.drawRect(0, -sh, sw, y + sh);
top.endFill(); top.endFill();
_this.addChild(top); _this.addChild(top);
var bottom = new engine.Shape(); var bottom = new engine.Shape();
......
...@@ -29,6 +29,13 @@ var GuideMgr = (function () { ...@@ -29,6 +29,13 @@ var GuideMgr = (function () {
enumerable: true, enumerable: true,
configurable: true configurable: true
}); });
Object.defineProperty(GuideMgr.prototype, "container", {
set: function (c) {
this._container = c;
},
enumerable: true,
configurable: true
});
Object.defineProperty(GuideMgr.prototype, "guideDone", { Object.defineProperty(GuideMgr.prototype, "guideDone", {
get: function () { get: function () {
return !this.guideFlag || this.done.length >= Object.keys(MConfigs_1.MConfigs.guide).length; return !this.guideFlag || this.done.length >= Object.keys(MConfigs_1.MConfigs.guide).length;
...@@ -54,7 +61,7 @@ var GuideMgr = (function () { ...@@ -54,7 +61,7 @@ var GuideMgr = (function () {
_this.guideFlag = false; _this.guideFlag = false;
} }
}; };
engine.gameStage.addChild(this.currentGuideMask); this._container.addChild(this.currentGuideMask);
}; };
GuideMgr._instance = null; GuideMgr._instance = null;
return GuideMgr; return GuideMgr;
......
...@@ -21,7 +21,9 @@ var ShootPlanet = (function (_super) { ...@@ -21,7 +21,9 @@ var ShootPlanet = (function (_super) {
return _this; return _this;
} }
ShootPlanet.prototype.onActive = function () { ShootPlanet.prototype.onActive = function () {
this.game = new Game_1.default(this); if (!this.game) {
this.game = new Game_1.default(this);
}
if (GuideMgr_1.default.instance.guideFlag == true) { if (GuideMgr_1.default.instance.guideFlag == true) {
var car = this.game._car; var car = this.game._car;
GuideMgr_1.default.instance.runGuide(0, car.x + car.width / 2, car.y + car.height / 2); GuideMgr_1.default.instance.runGuide(0, car.x + car.width / 2, car.y + car.height / 2);
......
var map = engine.findVariable('map', args, props);
var ua = navigator.userAgent.toLowerCase();
var env;
if (map) {
for (var key_1 in map) {
if (ua.indexOf(key_1) >= 0) {
env = map[key_1];
break;
}
}
}
var payload = args || {};
payload.env = env;
next('success', payload);
if (window['getPxToken']) {
window['getPxToken'](function (e, token) {
switch (e) {
case 'net error':
next('error', { type: 'error' });
break;
case 'need login':
next('failed', { type: 'failed' });
break;
case 'state invalid':
next('invalid', { type: 'invalid' });
break;
default:
if (token) {
scope.token = token;
next('success', args);
}
else {
next('invalid', { type: 'invalid key' });
}
}
});
}
else {
next('error', { type: 'no ready' });
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ZoomScroll = (function (_super) {
__extends(ZoomScroll, _super);
function ZoomScroll() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.autoInit = true;
_this.duration = 1000;
_this.index = 0;
_this.itemWidth = 0;
_this.itemHeight = 0;
_this.scaleMin = 0.7;
_this.scaleMax = 1;
_this.alphaOut = 0.5;
_this.alphaIn = 1;
_this._startDragOffset = { x: 0, y: 0 };
_this._dragOffset = { x: 0, y: 0 };
return _this;
}
ZoomScroll.prototype.mounted = function () {
this._centerOffset = this.host.width / 2;
if (this.autoInit) {
this.init();
}
};
ZoomScroll.prototype.sleep = function () {
};
ZoomScroll.prototype.update = function (t) {
};
ZoomScroll.prototype.init = function () {
for (var i = 0, li = this.host.children.length; i < li; i++) {
var child = this.host.children[i];
child.anchorX = child.width / 2;
child.anchorY = child.height / 2;
child.x = child.ix = i * this.itemWidth + this._centerOffset - this.itemWidth / 2;
}
this.scrollTo(0, false);
this.host.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDragStart, this);
};
ZoomScroll.prototype.updateOffset = function (offset) {
this._dragOffset.x = this._startDragOffset.x + offset.x;
for (var i = 0, li = this.host.children.length; i < li; i++) {
var child = this.host.children[i];
var x = child.x = child.ix + this._dragOffset.x;
var s = 40 / Math.abs(x - this._centerOffset + this.itemWidth / 2);
child.scaleX = child.scaleY = x === 0 ? 1 : Math.min(s + this.scaleMin, this.scaleMax);
child.alpha = x === 0 ? 1 : Math.min(s + this.alphaOut, this.alphaIn);
}
};
ZoomScroll.prototype.onDragStart = function (event) {
this.host.stage.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onDraging, this);
this.host.stage.addEventListener(engine.MouseEvent.MOUSE_UP, this.onDragEnd, this);
this._startDragPos = {
x: event.stageX,
y: event.stageY,
};
this._startDragOffset.x = this._dragOffset.x;
this._startDragOffset.y = this._dragOffset.y;
};
ZoomScroll.prototype.onDraging = function (event) {
if (!this._startDragPos) {
return;
}
var _a = this._startDragPos, x = _a.x, y = _a.y;
var stageX = event.stageX, stageY = event.stageY;
var offset = {
x: stageX - x,
y: stageY - y,
};
this.updateOffset(offset);
};
ZoomScroll.prototype.onDragEnd = function (event) {
this.host.stage.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onDraging, this);
this.host.stage.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onDragEnd, this);
if (!this._startDragPos) {
return;
}
this._startDragOffset.x = 0;
this._startDragOffset.y = 0;
var index = Math.round(this._dragOffset.x / this.itemWidth);
index = -Math.min(0, Math.max(1 - this.host.children.length, index));
this['_index'] = index;
this.scrollTo(index);
this._startDragPos = null;
};
Object.defineProperty(ZoomScroll.prototype, "t", {
get: function () {
return this._dragOffset.x;
},
set: function (v) {
this.updateOffset({ x: v, y: 0 });
},
enumerable: true,
configurable: true
});
ZoomScroll.prototype.scrollTo = function (index, animation) {
if (animation === void 0) { animation = true; }
var indexPos = -index * this.itemWidth;
if (animation) {
engine.Tween.get(this, null, null, true)
.to({ t: indexPos }, 100, engine.Ease.cubicOut);
}
else {
this.t = indexPos;
}
};
ZoomScroll.prototype.onModify = function (value, key, oldValue) {
var _this = this;
switch (key) {
case 'index':
var index_1 = value;
if (oldValue !== undefined) {
index_1 = Math.max(0, Math.min(this.host.children.length - 1, value));
this['_index'] = index_1;
}
setTimeout(function () {
_this.scrollTo(index_1, oldValue !== undefined);
});
break;
}
};
ZoomScroll.id = 'zoom-scroll';
__decorate([
engine.dirtyFieldTrigger
], ZoomScroll.prototype, "index", void 0);
__decorate([
engine.dirtyFieldTrigger
], ZoomScroll.prototype, "itemWidth", void 0);
__decorate([
engine.dirtyFieldTrigger
], ZoomScroll.prototype, "itemHeight", void 0);
__decorate([
engine.dirtyFieldTrigger
], ZoomScroll.prototype, "scaleMin", void 0);
__decorate([
engine.dirtyFieldTrigger
], ZoomScroll.prototype, "scaleMax", void 0);
__decorate([
engine.dirtyFieldTrigger
], ZoomScroll.prototype, "alphaOut", void 0);
__decorate([
engine.dirtyFieldTrigger
], ZoomScroll.prototype, "alphaIn", void 0);
return ZoomScroll;
}(engine.ScriptBase));
exports.default = ZoomScroll;
declare function getAssetByUUID(uuid: string); declare function getAssetByUUID(uuid: string);
declare function getAssetByName(name: string);
declare function getProps():any; declare function getProps():any;
...@@ -53,6 +53,9 @@ function launchWithCustomModule(customModule) { ...@@ -53,6 +53,9 @@ function launchWithCustomModule(customModule) {
function getAssetByUUID(uuid) { function getAssetByUUID(uuid) {
return engine.resolveCustomAsset(customId, uuid); return engine.resolveCustomAsset(customId, uuid);
} }
function getAssetByName(name){
return getAssetByUUID(engine.getAssetByName(name).uuid);
}
function getProps() { function getProps() {
return engine.getProps(customId); return engine.getProps(customId);
......
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
} }
function getTexture(uuid) { function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid); return engine.Texture.from(uuid);
} }
function getTextureByName(name) { function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid); return getTexture(getAssetByName(name).uuid);
} }
function getBlockAsset(type) { function getBlockAsset(type) {
return engine.getAssetByName(props.blockAssets[type]); return engine.getAssetByName(props.blockAssets[type]);
} }
function createSvga(name, anchorName) { function createSvga(name, anchorName) {
var inst = new svga.Svga(); var inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid; inst.source = 'asset://' + getAssetByName(name).uuid;
var anchor = props[(anchorName)]; var anchor = props[anchorName];
if (anchor) { if (anchor) {
inst.x = -anchor.x; inst.x = -anchor.x;
inst.y = -anchor.y; inst.y = -anchor.y;
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
return inst; return inst;
} }
function playSound(name) { function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, { keep: true }); engine.playSound(getAssetByName(name).uuid, { keep: true });
} }
var Block = (function (_super) { var Block = (function (_super) {
...@@ -853,6 +853,7 @@ ...@@ -853,6 +853,7 @@
}; };
return GameView; return GameView;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameView.js.map
var JumpHigh = (function (_super) { var JumpHigh = (function (_super) {
tslib.__extends(JumpHigh, _super); tslib.__extends(JumpHigh, _super);
......
...@@ -5,7 +5,7 @@ import Block from "./Block"; ...@@ -5,7 +5,7 @@ import Block from "./Block";
import {Background} from "./Background"; import {Background} from "./Background";
import Player from "./Player"; import Player from "./Player";
import {props} from "../props"; import {props} from "../props";
import {createSvga, getTextureByName, playSound} from "./utils"; import {createSvga, playSound} from "./utils";
import {Base} from "./Base"; import {Base} from "./Base";
import {GuideLayer} from "./GuideLayer"; import {GuideLayer} from "./GuideLayer";
import {GoldBag} from "./GoldBag"; import {GoldBag} from "./GoldBag";
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
import {props} from "../props"; import {props} from "../props";
export function getTexture(uuid) { export function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid); return engine.Texture.from(uuid);
} }
export function getTextureByName(name) { export function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid); return getTexture(getAssetByName(name).uuid);
} }
export function getBlockAsset(type) { export function getBlockAsset(type) {
...@@ -17,8 +17,8 @@ export function getBlockAsset(type) { ...@@ -17,8 +17,8 @@ export function getBlockAsset(type) {
export function createSvga(name, anchorName) { export function createSvga(name, anchorName) {
let inst = new svga.Svga(); let inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid; inst.source = 'asset://' + getAssetByName(name).uuid;
let anchor = props[(anchorName)]; let anchor = props[anchorName];
if (anchor) { if (anchor) {
inst.x = -anchor.x; inst.x = -anchor.x;
inst.y = -anchor.y; inst.y = -anchor.y;
...@@ -30,5 +30,5 @@ export function createSvga(name, anchorName) { ...@@ -30,5 +30,5 @@ export function createSvga(name, anchorName) {
} }
export function playSound(name) { export function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, {keep: true}); engine.playSound(getAssetByName(name).uuid, {keep: true});
} }
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
}; };
return GameObject; return GameObject;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=GameObject.js.map
var GameComponent = (function () { var GameComponent = (function () {
function GameComponent(owner) { function GameComponent(owner) {
...@@ -102,12 +103,14 @@ ...@@ -102,12 +103,14 @@
}); });
return GameComponent; return GameComponent;
}()); }());
//# sourceMappingURL=GameComponent.js.map
var DataMgr; var DataMgr;
(function (DataMgr) { (function (DataMgr) {
DataMgr.game = null; DataMgr.game = null;
DataMgr.minEnableCaptchaScore = null; DataMgr.minEnableCaptchaScore = null;
})(DataMgr || (DataMgr = {})); })(DataMgr || (DataMgr = {}));
//# sourceMappingURL=DataMgr.js.map
var Physics = (function (_super) { var Physics = (function (_super) {
tslib.__extends(Physics, _super); tslib.__extends(Physics, _super);
...@@ -168,6 +171,7 @@ ...@@ -168,6 +171,7 @@
}; };
return Physics; return Physics;
}(GameComponent)); }(GameComponent));
//# sourceMappingURL=Physics.js.map
var Collider = (function (_super) { var Collider = (function (_super) {
tslib.__extends(Collider, _super); tslib.__extends(Collider, _super);
...@@ -308,6 +312,7 @@ ...@@ -308,6 +312,7 @@
ColliderType[ColliderType["Rect"] = 1] = "Rect"; ColliderType[ColliderType["Rect"] = 1] = "Rect";
ColliderType[ColliderType["Point"] = 2] = "Point"; ColliderType[ColliderType["Point"] = 2] = "Point";
})(ColliderType || (ColliderType = {})); })(ColliderType || (ColliderType = {}));
//# sourceMappingURL=Collider.js.map
var MConst; var MConst;
(function (MConst) { (function (MConst) {
...@@ -347,6 +352,7 @@ ...@@ -347,6 +352,7 @@
MConst.WenzhouLocation = new engine.Rectangle(119.37, 27.03, 1.81, 1.33); MConst.WenzhouLocation = new engine.Rectangle(119.37, 27.03, 1.81, 1.33);
MConst.HangzhouLocation = new engine.Rectangle(118.21, 29.11, 2.09, 1.22); MConst.HangzhouLocation = new engine.Rectangle(118.21, 29.11, 2.09, 1.22);
})(MConst || (MConst = {})); })(MConst || (MConst = {}));
//# sourceMappingURL=MConst.js.map
var MoveObjcet = (function (_super) { var MoveObjcet = (function (_super) {
tslib.__extends(MoveObjcet, _super); tslib.__extends(MoveObjcet, _super);
...@@ -358,6 +364,7 @@ ...@@ -358,6 +364,7 @@
} }
return MoveObjcet; return MoveObjcet;
}(GameObject)); }(GameObject));
//# sourceMappingURL=MoveObject.js.map
var MEvent = (function () { var MEvent = (function () {
function MEvent() { function MEvent() {
...@@ -420,6 +427,7 @@ ...@@ -420,6 +427,7 @@
}; };
return MEvent; return MEvent;
}()); }());
//# sourceMappingURL=MEvent.js.map
var MTimer = (function () { var MTimer = (function () {
function MTimer() { function MTimer() {
...@@ -505,6 +513,7 @@ ...@@ -505,6 +513,7 @@
_onFrame.call(MTimer.deltaTime); _onFrame.call(MTimer.deltaTime);
timerTickEvent.call(); timerTickEvent.call();
} }
//# sourceMappingURL=MTimer.js.map
var GameMgr = (function () { var GameMgr = (function () {
function GameMgr(name) { function GameMgr(name) {
...@@ -521,6 +530,7 @@ ...@@ -521,6 +530,7 @@
}; };
return GameMgr; return GameMgr;
}()); }());
//# sourceMappingURL=GameMgr.js.map
function getTexture(uuid) { function getTexture(uuid) {
var config = getAssetByUUID(uuid); var config = getAssetByUUID(uuid);
...@@ -533,6 +543,7 @@ ...@@ -533,6 +543,7 @@
function clamp(target, min, max) { function clamp(target, min, max) {
return Math.min(max, Math.max(min, target)); return Math.min(max, Math.max(min, target));
} }
//# sourceMappingURL=utils.js.map
var bulletSpeedValue = 20; var bulletSpeedValue = 20;
var frameCountThatBulletsMoveInX = 4; var frameCountThatBulletsMoveInX = 4;
...@@ -610,6 +621,7 @@ ...@@ -610,6 +621,7 @@
}; };
return HorizontalMoveMgr; return HorizontalMoveMgr;
}(GameMgr)); }(GameMgr));
//# sourceMappingURL=Bullet.js.map
var SoundMgr = (function () { var SoundMgr = (function () {
function SoundMgr() { function SoundMgr() {
...@@ -648,6 +660,7 @@ ...@@ -648,6 +660,7 @@
dong: "7fc04e43-1465-4336-92a3-d6039ee88cb3", dong: "7fc04e43-1465-4336-92a3-d6039ee88cb3",
boom: "ca6b799f-be85-4e94-99df-812f31801490" boom: "ca6b799f-be85-4e94-99df-812f31801490"
}; };
//# sourceMappingURL=SoundMgr.js.map
var props = {}; var props = {};
function prepareProps() { function prepareProps() {
...@@ -657,6 +670,7 @@ ...@@ -657,6 +670,7 @@
function injectProps(p) { function injectProps(p) {
engine.injectProp(props, p); engine.injectProp(props, p);
} }
//# sourceMappingURL=props.js.map
var Car = (function (_super) { var Car = (function (_super) {
tslib.__extends(Car, _super); tslib.__extends(Car, _super);
...@@ -778,6 +792,7 @@ ...@@ -778,6 +792,7 @@
}; };
return Car; return Car;
}(GameObject)); }(GameObject));
//# sourceMappingURL=Car.js.map
var PlayerController = (function (_super) { var PlayerController = (function (_super) {
tslib.__extends(PlayerController, _super); tslib.__extends(PlayerController, _super);
...@@ -814,6 +829,7 @@ ...@@ -814,6 +829,7 @@
} }
return PlayerController; return PlayerController;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=PlayerController.js.map
var MConfigs; var MConfigs;
(function (MConfigs) { (function (MConfigs) {
...@@ -914,6 +930,7 @@ ...@@ -914,6 +930,7 @@
}, },
}; };
})(MConfigs || (MConfigs = {})); })(MConfigs || (MConfigs = {}));
//# sourceMappingURL=MConfigs.js.map
var MUtils; var MUtils;
(function (MUtils) { (function (MUtils) {
...@@ -973,6 +990,7 @@ ...@@ -973,6 +990,7 @@
} }
MUtils.setColorFilter = setColorFilter; MUtils.setColorFilter = setColorFilter;
})(MUtils || (MUtils = {})); })(MUtils || (MUtils = {}));
//# sourceMappingURL=MUtils.js.map
function getBallScore(bulletScore, powerScore, colorIndex) { function getBallScore(bulletScore, powerScore, colorIndex) {
var getScoreFromRange = function (_a) { var getScoreFromRange = function (_a) {
...@@ -1060,6 +1078,7 @@ ...@@ -1060,6 +1078,7 @@
} }
return newArray; return newArray;
} }
//# sourceMappingURL=GUtils.js.map
var UILayer = (function (_super) { var UILayer = (function (_super) {
tslib.__extends(UILayer, _super); tslib.__extends(UILayer, _super);
...@@ -1071,6 +1090,7 @@ ...@@ -1071,6 +1090,7 @@
} }
return UILayer; return UILayer;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=UILayer.js.map
var DebugMgr = (function (_super) { var DebugMgr = (function (_super) {
tslib.__extends(DebugMgr, _super); tslib.__extends(DebugMgr, _super);
...@@ -1225,6 +1245,7 @@ ...@@ -1225,6 +1245,7 @@
DebugMgr._instance = null; DebugMgr._instance = null;
return DebugMgr; return DebugMgr;
}(UILayer)); }(UILayer));
//# sourceMappingURL=DebugMgr.js.map
var instanceId1 = null; var instanceId1 = null;
var instanceId2 = null; var instanceId2 = null;
...@@ -1462,6 +1483,7 @@ ...@@ -1462,6 +1483,7 @@
7: 2 7: 2
}; };
var GroupMaxIndex = 7; var GroupMaxIndex = 7;
//# sourceMappingURL=PhycicsSystem.js.map
var PoolGroup = (function () { var PoolGroup = (function () {
function PoolGroup(layer) { function PoolGroup(layer) {
...@@ -1484,6 +1506,7 @@ ...@@ -1484,6 +1506,7 @@
}; };
return Pool; return Pool;
}()); }());
//# sourceMappingURL=Pool.js.map
var padding = 10; var padding = 10;
var GuideMask = (function (_super) { var GuideMask = (function (_super) {
...@@ -1505,7 +1528,7 @@ ...@@ -1505,7 +1528,7 @@
var alpha = 0.7; var alpha = 0.7;
var top = new engine.Shape(); var top = new engine.Shape();
top.beginFill(color, alpha); top.beginFill(color, alpha);
top.drawRect(0, 0, sw, y); top.drawRect(0, -sh, sw, y + sh);
top.endFill(); top.endFill();
_this.addChild(top); _this.addChild(top);
var bottom = new engine.Shape(); var bottom = new engine.Shape();
...@@ -1581,6 +1604,13 @@ ...@@ -1581,6 +1604,13 @@
enumerable: true, enumerable: true,
configurable: true configurable: true
}); });
Object.defineProperty(GuideMgr.prototype, "container", {
set: function (c) {
this._container = c;
},
enumerable: true,
configurable: true
});
Object.defineProperty(GuideMgr.prototype, "guideDone", { Object.defineProperty(GuideMgr.prototype, "guideDone", {
get: function () { get: function () {
return !this.guideFlag || this.done.length >= Object.keys(MConfigs.guide).length; return !this.guideFlag || this.done.length >= Object.keys(MConfigs.guide).length;
...@@ -1606,11 +1636,12 @@ ...@@ -1606,11 +1636,12 @@
_this.guideFlag = false; _this.guideFlag = false;
} }
}; };
engine.gameStage.addChild(this.currentGuideMask); this._container.addChild(this.currentGuideMask);
}; };
GuideMgr._instance = null; GuideMgr._instance = null;
return GuideMgr; return GuideMgr;
}()); }());
//# sourceMappingURL=GuideMgr.js.map
var tempPower = null; var tempPower = null;
var imageNames = [ var imageNames = [
...@@ -1857,6 +1888,7 @@ ...@@ -1857,6 +1888,7 @@
Ball.textures = []; Ball.textures = [];
return Ball; return Ball;
}(MoveObjcet)); }(MoveObjcet));
//# sourceMappingURL=Ball.js.map
var BallPool = (function (_super) { var BallPool = (function (_super) {
tslib.__extends(BallPool, _super); tslib.__extends(BallPool, _super);
...@@ -1898,6 +1930,7 @@ ...@@ -1898,6 +1930,7 @@
}; };
return BallPoolGroup; return BallPoolGroup;
}(PoolGroup)); }(PoolGroup));
//# sourceMappingURL=BallPool.js.map
var FrameAnimationMgr = (function (_super) { var FrameAnimationMgr = (function (_super) {
tslib.__extends(FrameAnimationMgr, _super); tslib.__extends(FrameAnimationMgr, _super);
...@@ -1998,6 +2031,7 @@ ...@@ -1998,6 +2031,7 @@
FrameAnimation.caches = {}; FrameAnimation.caches = {};
return FrameAnimation; return FrameAnimation;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=FrameAnimation.js.map
var PoolFrameAnimation = (function (_super) { var PoolFrameAnimation = (function (_super) {
tslib.__extends(PoolFrameAnimation, _super); tslib.__extends(PoolFrameAnimation, _super);
...@@ -2046,6 +2080,7 @@ ...@@ -2046,6 +2080,7 @@
}; };
return AnimationPoolGroup; return AnimationPoolGroup;
}(PoolGroup)); }(PoolGroup));
//# sourceMappingURL=AnimationPool.js.map
var BulletPool = (function (_super) { var BulletPool = (function (_super) {
tslib.__extends(BulletPool, _super); tslib.__extends(BulletPool, _super);
...@@ -2066,6 +2101,7 @@ ...@@ -2066,6 +2101,7 @@
}; };
return BulletPool; return BulletPool;
}(Pool)); }(Pool));
//# sourceMappingURL=BulletPool.js.map
var TextureMgr; var TextureMgr;
(function (TextureMgr) { (function (TextureMgr) {
...@@ -2101,6 +2137,7 @@ ...@@ -2101,6 +2137,7 @@
} }
TextureMgr.get = get; TextureMgr.get = get;
})(TextureMgr || (TextureMgr = {})); })(TextureMgr || (TextureMgr = {}));
//# sourceMappingURL=TextureMgr.js.map
var InitSpeedValue = 0.08; var InitSpeedValue = 0.08;
var alphaDuration = 300; var alphaDuration = 300;
...@@ -2233,6 +2270,7 @@ ...@@ -2233,6 +2270,7 @@
}; };
return SpBoomEffectPoolGroup; return SpBoomEffectPoolGroup;
}(PoolGroup)); }(PoolGroup));
//# sourceMappingURL=SpBoomEffect.js.map
var dropImgNames = [ var dropImgNames = [
"f7221f86-f376-40ce-b0e8-f7ea573ec780", "f7221f86-f376-40ce-b0e8-f7ea573ec780",
...@@ -2352,6 +2390,7 @@ ...@@ -2352,6 +2390,7 @@
}; };
return Drop; return Drop;
}(MoveObjcet)); }(MoveObjcet));
//# sourceMappingURL=Drop.js.map
var DropPool = (function (_super) { var DropPool = (function (_super) {
tslib.__extends(DropPool, _super); tslib.__extends(DropPool, _super);
...@@ -2385,6 +2424,7 @@ ...@@ -2385,6 +2424,7 @@
}; };
return DropPoolGroup; return DropPoolGroup;
}(PoolGroup)); }(PoolGroup));
//# sourceMappingURL=DropPool.js.map
var DropBlinkMgr = (function (_super) { var DropBlinkMgr = (function (_super) {
tslib.__extends(DropBlinkMgr, _super); tslib.__extends(DropBlinkMgr, _super);
...@@ -2428,6 +2468,7 @@ ...@@ -2428,6 +2468,7 @@
return DropBlinkMgr; return DropBlinkMgr;
}(GameMgr)); }(GameMgr));
var BlinkDuration = 3; var BlinkDuration = 3;
//# sourceMappingURL=DropBlinkMgr.js.map
var Game = (function () { var Game = (function () {
function Game(parent) { function Game(parent) {
...@@ -2465,6 +2506,7 @@ ...@@ -2465,6 +2506,7 @@
this.pause = false; this.pause = false;
this.loadRes(); this.loadRes();
parent.addChild(this.node); parent.addChild(this.node);
GuideMgr.instance.container = parent;
this.node.width = MConst.DesignResolution.width; this.node.width = MConst.DesignResolution.width;
this.node.height = MConst.DesignResolution.height; this.node.height = MConst.DesignResolution.height;
var bg = new engine.Image(getTexture("d99368b8-af5d-4d9e-981e-7bce3e1c1e84")); var bg = new engine.Image(getTexture("d99368b8-af5d-4d9e-981e-7bce3e1c1e84"));
...@@ -2762,6 +2804,7 @@ ...@@ -2762,6 +2804,7 @@
}); });
return Game; return Game;
}()); }());
//# sourceMappingURL=Game.js.map
var ShootPlanet = (function (_super) { var ShootPlanet = (function (_super) {
tslib.__extends(ShootPlanet, _super); tslib.__extends(ShootPlanet, _super);
...@@ -2780,7 +2823,9 @@ ...@@ -2780,7 +2823,9 @@
return _this; return _this;
} }
ShootPlanet.prototype.onActive = function () { ShootPlanet.prototype.onActive = function () {
this.game = new Game(this); if (!this.game) {
this.game = new Game(this);
}
if (GuideMgr.instance.guideFlag == true) { if (GuideMgr.instance.guideFlag == true) {
var car = this.game._car; var car = this.game._car;
GuideMgr.instance.runGuide(0, car.x + car.width / 2, car.y + car.height / 2); GuideMgr.instance.runGuide(0, car.x + car.width / 2, car.y + car.height / 2);
...@@ -2818,6 +2863,7 @@ ...@@ -2818,6 +2863,7 @@
}; };
return ShootPlanet; return ShootPlanet;
}(engine.Container)); }(engine.Container));
//# sourceMappingURL=ShootPlanet.js.map
function index (props) { function index (props) {
prepareProps(); prepareProps();
...@@ -2825,6 +2871,7 @@ ...@@ -2825,6 +2871,7 @@
var instance = new ShootPlanet(); var instance = new ShootPlanet();
return instance; return instance;
} }
//# sourceMappingURL=index.js.map
return index; return index;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -152,6 +152,8 @@ export default class Game { ...@@ -152,6 +152,8 @@ export default class Game {
this.loadRes(); this.loadRes();
parent.addChild(this.node); parent.addChild(this.node);
GuideMgr.instance.container = parent;
this.node.width = MConst.DesignResolution.width; this.node.width = MConst.DesignResolution.width;
this.node.height = MConst.DesignResolution.height; this.node.height = MConst.DesignResolution.height;
let bg = new engine.Image(getTexture("d99368b8-af5d-4d9e-981e-7bce3e1c1e84")); let bg = new engine.Image(getTexture("d99368b8-af5d-4d9e-981e-7bce3e1c1e84"));
......
...@@ -28,7 +28,7 @@ export default class GuideMask extends engine.Container { ...@@ -28,7 +28,7 @@ export default class GuideMask extends engine.Container {
let top = new engine.Shape(); let top = new engine.Shape();
top.beginFill(color, alpha); top.beginFill(color, alpha);
top.drawRect(0, 0, sw, y); top.drawRect(0, -sh, sw, y + sh);
top.endFill(); top.endFill();
this.addChild(top); this.addChild(top);
......
...@@ -22,7 +22,12 @@ export default class GuideMgr { ...@@ -22,7 +22,12 @@ export default class GuideMgr {
localStorage.setItem("shoot-planet_" + props.guideFlagKey, v ? "true" : "false"); localStorage.setItem("shoot-planet_" + props.guideFlagKey, v ? "true" : "false");
} }
set container(c){
this._container = c;
}
private done: number[] = []; private done: number[] = [];
private _container: engine.Container;
get guideDone(){ get guideDone(){
return !this.guideFlag || this.done.length >= Object.keys(MConfigs.guide).length; return !this.guideFlag || this.done.length >= Object.keys(MConfigs.guide).length;
...@@ -46,6 +51,6 @@ export default class GuideMgr { ...@@ -46,6 +51,6 @@ export default class GuideMgr {
this.guideFlag = false; this.guideFlag = false;
} }
}; };
engine.gameStage.addChild(this.currentGuideMask); this._container.addChild(this.currentGuideMask);
} }
} }
\ No newline at end of file
...@@ -25,7 +25,9 @@ export class ShootPlanet extends engine.Container { ...@@ -25,7 +25,9 @@ export class ShootPlanet extends engine.Container {
} }
public onActive() { public onActive() {
this.game = new Game(this); if(!this.game){
this.game = new Game(this);
}
if (GuideMgr.instance.guideFlag == true) { if (GuideMgr.instance.guideFlag == true) {
const car = this.game._car; const car = this.game._car;
GuideMgr.instance.runGuide(0, car.x + car.width / 2, car.y + car.height / 2 /* - 130 */); GuideMgr.instance.runGuide(0, car.x + car.width / 2, car.y + car.height / 2 /* - 130 */);
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
const eventName = engine.findVariable('eventName', args, props); const eventName = engine.findVariable('eventName', args, props);
const data = engine.findVariable('data', args, props); const data = engine.findVariable('data', args, props);
const useCapture = engine.findVariable('useCapture', args, props); const useCapture = engine.findVariable('useCapture', args, props);
const isGlobal = engine.findVariable('isGlobal', args, props);
if(eventName){ if(eventName){
engine.globalEvent.dispatchEvent(eventName, data, useCapture); let sender = isGlobal ? engine.globalEvent : target;
sender.dispatchEvent(eventName, data, useCapture);
} }
next('success', args); next('success', args);
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
"type": "boolean", "type": "boolean",
"alias": "是否捕获", "alias": "是否捕获",
"default": true "default": true
},
"isGlobal": {
"type": "boolean",
"alias": "是否全局",
"default": true
} }
}, },
"output": [ "output": [
......
...@@ -2,16 +2,19 @@ ...@@ -2,16 +2,19 @@
* Created by rockyl on 2019-12-05. * Created by rockyl on 2019-12-05.
*/ */
const map = engine.findVariable('map', args, props);
const ua = navigator.userAgent.toLowerCase(); const ua = navigator.userAgent.toLowerCase();
let env; var env;
if(ua.indexOf('eversunshine') >= 0){
env = 'eversunshine'
}else if(ua.indexOf('micromessenger') >= 0){
env = 'weixin'
}
console.log('env:', env); if(map){
for (let key in map) {
if (ua.indexOf(key) >= 0) {
env = map[key];
break;
}
}
}
const payload = args || {}; const payload = args || {};
payload.env = env; payload.env = env;
......
{ {
"props": {}, "props": {
"map": {
"alias": "UA包含表",
"type": "map"
}
},
"name": "环境判断", "name": "环境判断",
"output": [ "output": [
"success" "success"
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
"metas": [ "metas": [
{ {
"id": "duiba-api-transform", "id": "duiba-api-transform",
"script": "if (args.success) {\n next('success', args.data);\n}\nelse {\n\tengine.globalEvent.dispatchEvent('net-failed', args);\n next('failed', args);\n}\n", "script": "if (args.success) {\n\tvar payload;\n\n\tif (typeof args.data === 'object') {\n\t\tpayload = engine.objClone(args.data);\n\n\t\tvar origin = engine.objClone(args);\n\t\tObject.defineProperty(payload, '__origin', {\n\t\t\tget: function () {\n\t\t\t\treturn origin\n\t\t\t},\n\t\t\tenumerable: false\n\t\t});\n\t} else {\n\t\tpayload = args.data;\n\t}\n\tnext('success', payload);\n}\nelse {\n\tengine.globalEvent.dispatchEvent('net-failed', args);\n\tnext('failed', args);\n}",
"props": {}, "props": {},
"isInline": true, "isInline": true,
"name": "兑吧接口转换", "name": "兑吧接口转换",
......
{ {
"name": "Http轮询", "name": "兑吧接口轮询",
"props": { "props": {
"url": { "url": {
"type": "string", "type": "string",
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
"subEntry": "442452af-e4d2-47be-b931-86fef866056f", "subEntry": "442452af-e4d2-47be-b931-86fef866056f",
"metas": [ "metas": [
{ {
"script": "var count = props.count, field = props.field, successValues = props.successValues;\nvar key = 'counting-' + vm.id;\nvar counting = global[key] || 0;\ncounting++;\nvar successArr = successValues.split(',');\nif (successArr.indexOf(args[field] + '') >= 0) {\n delete global[key];\n next('success', args);\n}\nelse if (counting < count) {\n global[key] = counting;\n next('continue');\n}\nelse {\n delete global[key];\n next('timeout');\n}\n", "script": "var count = props.count, field = props.field, successValues = props.successValues;\nvar key = 'counting-' + vm.id;\nvar counting = global[key] || 0;\ncounting++;\nvar successValue = engine.getDataByPath(args, field) + '';\nvar successArr = successValues.split(',');\nif (successArr.indexOf(successValue) >= 0) {\n delete global[key];\n next('success', args);\n}\nelse if (counting < count) {\n global[key] = counting;\n next('continue');\n}\nelse {\n delete global[key];\n next('timeout');\n}",
"props": { "props": {
"count": { "count": {
"type": "number", "type": "number",
......
{
"props": {
"weichatShareView": {
"type": "string",
"enum": [],
"alias": "微信分享引导弹窗"
},
"shareSuccessView": {
"type": "string",
"enum": [],
"alias": "分享成功弹窗"
},
"successEvent": {
"type": "string",
"enum": [],
"alias": "成功事件"
}
},
"name": "执行分享逻辑",
"output": [],
"sub": {
"55d7b124-59ae-4436-bcda-0a0c96426f7a": {
"uuid": "55d7b124-59ae-4436-bcda-0a0c96426f7a",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"845311af-a1ed-4f59-a162-e8115f5f9d1b"
]
}
},
"845311af-a1ed-4f59-a162-e8115f5f9d1b": {
"uuid": "845311af-a1ed-4f59-a162-e8115f5f9d1b",
"meta": "f822b421-a9ee-4507-84cc-3a73c7409be1",
"design": {
"x": 194,
"y": 57,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 17.5
}
],
"failed": [
{
"x": 124.5,
"y": 31.5
}
],
"weichat": [
{
"x": 124.5,
"y": 45.5
}
]
}
},
"props": {},
"output": {
"success": [
"77a3ef2d-b7bf-4502-8711-1eb7bedff765"
],
"failed": [],
"weichat": [
"d9b45fb9-a353-4888-afe8-def5de615818"
]
}
},
"77a3ef2d-b7bf-4502-8711-1eb7bedff765": {
"uuid": "77a3ef2d-b7bf-4502-8711-1eb7bedff765",
"meta": "api-request",
"design": {
"x": 410,
"y": 6,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 68.5
}
],
"failed": [
{
"x": 124.5,
"y": 82.5
}
],
"exception": [
{
"x": 124.5,
"y": 96.5
}
]
}
},
"props": {
"uri": "lipstick/share.do",
"params": {
"type": "map",
"value": {
"channelType": {
"type": "env",
"value": "channelType"
}
}
}
},
"output": {
"success": [
"598b346d-0959-4a85-8a0a-76b6bda9181f"
],
"failed": [
"b50492a4-ef2c-4cd5-afd9-52db7d472edf"
],
"exception": [
"b50492a4-ef2c-4cd5-afd9-52db7d472edf"
]
}
},
"1decb2de-a422-4cc4-8700-1945e4bcbed3": {
"uuid": "1decb2de-a422-4cc4-8700-1945e4bcbed3",
"meta": "pop-dialog",
"design": {
"x": 919,
"y": 94,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {},
"output": {}
},
"d9b45fb9-a353-4888-afe8-def5de615818": {
"uuid": "d9b45fb9-a353-4888-afe8-def5de615818",
"meta": "push-dialog",
"design": {
"x": 411,
"y": 235,
"input": {
"default": [
{
"x": 5.5,
"y": 48.5
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 48.5
}
]
}
},
"props": {
"viewName": {
"type": "link",
"alias": "weichatShareView"
}
},
"output": {},
"alias": "微信分享引导弹窗"
},
"598b346d-0959-4a85-8a0a-76b6bda9181f": {
"uuid": "598b346d-0959-4a85-8a0a-76b6bda9181f",
"meta": "d2cf224c-e451-447e-8c5a-1c963f7a01b0",
"design": {
"x": 636,
"y": 0,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"close": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"success": [
"54ecdde8-5ef1-47ef-95a3-a49d8f13f345"
],
"failed": [],
"close": [
"1decb2de-a422-4cc4-8700-1945e4bcbed3"
]
}
},
"b50492a4-ef2c-4cd5-afd9-52db7d472edf": {
"uuid": "b50492a4-ef2c-4cd5-afd9-52db7d472edf",
"meta": "6f5e39c3-341e-4b90-9690-783de5466937",
"design": {
"x": 668,
"y": 253,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
},
"54ecdde8-5ef1-47ef-95a3-a49d8f13f345": {
"uuid": "54ecdde8-5ef1-47ef-95a3-a49d8f13f345",
"meta": "b54bfb2f-57fe-407d-b71a-1ebab5eb59cf",
"design": {
"x": 924,
"y": -15,
"input": {
"default": [
{
"x": 5.5,
"y": 48.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 41.5
}
],
"failed": [
{
"x": 124.5,
"y": 55.5
}
]
}
},
"props": {
"shareSuccessView": {
"type": "link",
"alias": "shareSuccessView"
},
"successEvent": {
"type": "link",
"alias": "successEvent"
}
},
"output": {}
}
},
"subEntry": "55d7b124-59ae-4436-bcda-0a0c96426f7a",
"metas": [
{
"id": "f822b421-a9ee-4507-84cc-3a73c7409be1",
"script": "\nif(engine.env.channelType==\"1\"){\n let opts={\n shareTitle:engine.env.shareTitle,\n shareContent:engine.env.shareContent,\n shareUrl:engine.env.shareUrl,\n shareThumbnail:engine.env.shareThumbnail,\n }\n window[\"requireShare\"](opts,()=>{\n next(\"success\")\n },()=>{\n next(\"failed\")\n });\n}else{\n next(\"weichat\")\n}",
"props": {},
"isInline": true,
"name": "执行分享方法",
"output": [
"success",
"failed",
"weichat"
],
"sub": {
"9391b950-6e2e-477c-93d4-1bfb377cc647": {
"uuid": "9391b950-6e2e-477c-93d4-1bfb377cc647",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "9391b950-6e2e-477c-93d4-1bfb377cc647"
},
{
"id": "d2cf224c-e451-447e-8c5a-1c963f7a01b0",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "组件异常处理",
"output": [
"success",
"close"
],
"sub": {
"626001a8-2b34-4640-9be8-129c1f4a020b": {
"uuid": "626001a8-2b34-4640-9be8-129c1f4a020b",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"a38e20b5-d00e-4c55-94b5-e44d2c28ee1a"
]
}
},
"a38e20b5-d00e-4c55-94b5-e44d2c28ee1a": {
"uuid": "a38e20b5-d00e-4c55-94b5-e44d2c28ee1a",
"meta": "232e7e7c-b355-4a8f-9e71-922e0f53bf87",
"design": {
"x": 210,
"y": 75,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"failed": [
"d9897477-c675-4562-bc0e-5e6c554e80b0"
]
}
},
"d9897477-c675-4562-bc0e-5e6c554e80b0": {
"uuid": "d9897477-c675-4562-bc0e-5e6c554e80b0",
"meta": "show-toast",
"design": {
"x": 447,
"y": 102,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 82.5
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200
},
"output": {
"success": [
"af837ac1-6da5-4913-b945-10eab22fba07"
]
}
},
"af837ac1-6da5-4913-b945-10eab22fba07": {
"uuid": "af837ac1-6da5-4913-b945-10eab22fba07",
"meta": "f2578ea7-67c7-45b1-b41b-7663361957f7",
"design": {
"x": 692,
"y": 171,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"close": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "626001a8-2b34-4640-9be8-129c1f4a020b",
"metas": [
{
"id": "232e7e7c-b355-4a8f-9e71-922e0f53bf87",
"script": "if(args.interrupt){\n if(args.errorMessage){\n next(\"failed\",{text:args.errorMessage})\n }else{\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n }\n \n}else{\n next(\"success\",args)\n}",
"props": {},
"isInline": true,
"from": "custom",
"name": "判错逻辑",
"output": [
"success",
"failed"
]
},
{
"id": "f2578ea7-67c7-45b1-b41b-7663361957f7",
"script": "next(\"close\",args)",
"props": {},
"isInline": true,
"from": "custom",
"name": "终止",
"output": [
"close"
]
}
]
},
{
"id": "6f5e39c3-341e-4b90-9690-783de5466937",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "接口异常Toast",
"output": [
"success",
"failed"
],
"sub": {
"6c6b9ec9-76dc-44a4-a436-7c016e4f2599": {
"uuid": "6c6b9ec9-76dc-44a4-a436-7c016e4f2599",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"3d797ee7-1e6e-4ae1-9718-13292001b2b4"
]
}
},
"3d797ee7-1e6e-4ae1-9718-13292001b2b4": {
"uuid": "3d797ee7-1e6e-4ae1-9718-13292001b2b4",
"meta": "096eec4b-4603-4c5e-b762-498915345e18",
"design": {
"x": 201,
"y": 199,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"success": [],
"failed": [
"4d0225a7-24bb-4a1d-b14c-13d6a15e304b"
]
}
},
"57b7e460-2717-479a-a789-a25d1b9373f4": {
"uuid": "57b7e460-2717-479a-a789-a25d1b9373f4",
"meta": "show-toast",
"design": {
"x": 684,
"y": 218,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 82.5
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200,
"viewName": ""
},
"output": {}
},
"4d0225a7-24bb-4a1d-b14c-13d6a15e304b": {
"uuid": "4d0225a7-24bb-4a1d-b14c-13d6a15e304b",
"meta": "fadbbfe0-aff9-401d-a001-9b1091fb464e",
"design": {
"x": 414,
"y": 219,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"57b7e460-2717-479a-a789-a25d1b9373f4"
],
"p1": [
"c456022e-25b9-44dd-9bf6-e7973b173922"
]
}
},
"c456022e-25b9-44dd-9bf6-e7973b173922": {
"uuid": "c456022e-25b9-44dd-9bf6-e7973b173922",
"meta": "wait",
"design": {
"x": 678,
"y": 410,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"duration": 1000
},
"output": {
"complete": [
"e02a8757-cfaa-47cc-8c4a-2965d18e63c8"
]
}
},
"e02a8757-cfaa-47cc-8c4a-2965d18e63c8": {
"uuid": "e02a8757-cfaa-47cc-8c4a-2965d18e63c8",
"meta": "f3b3d538-e0a3-49bc-8363-4520b691710b",
"design": {
"x": 956,
"y": 483,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "6c6b9ec9-76dc-44a4-a436-7c016e4f2599",
"metas": [
{
"id": "096eec4b-4603-4c5e-b762-498915345e18",
"script": "console.log(args)\nif(!args){\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n}else{\n if(args.message){\n if(args.code!='100001'){\n next(\"failed\",{text:args.message})\n }\n }else{\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n }\n}\n",
"props": {},
"isInline": true,
"from": "custom",
"name": "判错逻辑",
"output": [
"success",
"failed"
]
},
{
"id": "fadbbfe0-aff9-401d-a001-9b1091fb464e",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "f3b3d538-e0a3-49bc-8363-4520b691710b",
"script": "next(\"success\")",
"props": {},
"isInline": true,
"from": "custom",
"name": "终止",
"output": [
"success"
]
}
]
},
{
"id": "b54bfb2f-57fe-407d-b71a-1ebab5eb59cf",
"script": "",
"props": {
"shareSuccessView": {
"type": "string",
"enum": [],
"alias": "分享成功弹窗"
},
"successEvent": {
"type": "string",
"enum": [],
"alias": "成功事件"
}
},
"isInline": true,
"from": "custom",
"name": "分享成功处理",
"output": [
"success",
"failed"
],
"sub": {
"95048c23-a7af-4b75-b6ae-86150441fbe2": {
"uuid": "95048c23-a7af-4b75-b6ae-86150441fbe2",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"250e5a77-be2d-4d20-9551-d4f723105621"
]
}
},
"250e5a77-be2d-4d20-9551-d4f723105621": {
"uuid": "250e5a77-be2d-4d20-9551-d4f723105621",
"meta": "pop-dialog",
"design": {
"x": 211,
"y": 63,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"closeAll": true
},
"output": {
"complete": [
"32f37033-67af-4c71-bf8f-ac1dead6e150"
]
}
},
"32f37033-67af-4c71-bf8f-ac1dead6e150": {
"uuid": "32f37033-67af-4c71-bf8f-ac1dead6e150",
"meta": "ce2a1072-edd1-42b8-b65a-ca137d1d5fdd",
"design": {
"x": 415,
"y": 80,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"38041cd7-fc6c-4fd1-9aef-bf6f26ea4546"
],
"p1": [
"0fbf93fb-3946-41dd-9d15-9d7e3bb9e489"
]
}
},
"38041cd7-fc6c-4fd1-9aef-bf6f26ea4546": {
"uuid": "38041cd7-fc6c-4fd1-9aef-bf6f26ea4546",
"meta": "dispatch-event",
"design": {
"x": 648,
"y": 24,
"input": {
"default": [
{
"x": 5.5,
"y": 57
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 57
}
]
}
},
"props": {
"eventName": {
"type": "link",
"alias": "successEvent"
}
},
"output": {},
"alias": "派发分享成功事件"
},
"0fbf93fb-3946-41dd-9d15-9d7e3bb9e489": {
"uuid": "0fbf93fb-3946-41dd-9d15-9d7e3bb9e489",
"meta": "13fdecf7-ebc9-4c33-b040-775a34a2eea3",
"design": {
"x": 647,
"y": 177,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"failed": [
"af9f7e73-50cb-4b7e-a5bc-134e81214008"
]
}
},
"af9f7e73-50cb-4b7e-a5bc-134e81214008": {
"uuid": "af9f7e73-50cb-4b7e-a5bc-134e81214008",
"meta": "push-dialog",
"design": {
"x": 860,
"y": 202,
"input": {
"default": [
{
"x": 5.5,
"y": 48.5
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 48.5
}
]
}
},
"props": {
"viewName": {
"type": "link",
"alias": "shareSuccessView"
}
},
"output": {},
"alias": "分享成功弹窗"
}
},
"subEntry": "95048c23-a7af-4b75-b6ae-86150441fbe2",
"metas": [
{
"id": "ce2a1072-edd1-42b8-b65a-ca137d1d5fdd",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "13fdecf7-ebc9-4c33-b040-775a34a2eea3",
"script": " if(global.dataCenter.store.coop_config[\"rpb.lipstick.share.appShareWay\"]==\"true\"||global.dataCenter.store.coop_config[\"rpb.lipstick.share.officalAccountShareWay\"]==\"true\"){\n next(\"success\",args)\n }else{\n next(\"failed\",args)\n }",
"props": {},
"isInline": true,
"from": "custom",
"name": "是否为真分享",
"output": [
"success",
"failed"
]
}
]
}
],
"isPrefab": true
}
\ No newline at end of file
{
"props": {},
"from": "custom",
"name": "设置分享信息",
"output": [
"success",
"failed"
],
"sub": {
"a75eb5c6-b147-4b19-97eb-a31cf7667fff": {
"uuid": "a75eb5c6-b147-4b19-97eb-a31cf7667fff",
"meta": "entry",
"design": {
"x": -342,
"y": 70,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"e8c7c2d5-fc7e-444a-89f2-252cb8cd6b25"
]
}
},
"2a88bbc9-6d81-43d7-ad1a-a129a9f7e8e6": {
"uuid": "2a88bbc9-6d81-43d7-ad1a-a129a9f7e8e6",
"meta": "api-request",
"design": {
"x": 220,
"y": -99,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 68.5
}
],
"failed": [
{
"x": 124.5,
"y": 82.5
}
],
"exception": [
{
"x": 124.5,
"y": 96.5
}
]
}
},
"props": {
"uri": "lipstick/getShareInfo.do",
"dataName": "getShareInfo",
"params": {
"type": "map",
"value": {}
}
},
"output": {
"success": [
"0cde2623-e145-41ed-bd6c-f313f19adb88"
],
"failed": [
"d5ed77ee-4774-4395-aa4a-60301ba4561f"
],
"exception": [
"d5ed77ee-4774-4395-aa4a-60301ba4561f"
]
}
},
"0cde2623-e145-41ed-bd6c-f313f19adb88": {
"uuid": "0cde2623-e145-41ed-bd6c-f313f19adb88",
"meta": "b283de43-2d3a-4721-965f-90c8a70c5162",
"design": {
"x": 480,
"y": -115,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"8e6024ea-574e-49d0-99f8-13719f7b2c12"
]
}
},
"38471b30-788a-4384-abe3-02961eaa246d": {
"uuid": "38471b30-788a-4384-abe3-02961eaa246d",
"meta": "duiba-api",
"design": {
"x": 231,
"y": 144,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 75.5
}
],
"failed": [
{
"x": 124.5,
"y": 89.5
}
]
}
},
"props": {
"url": {
"type": "static",
"value": "/aaw/projectx/getDevAppInfo"
},
"name": "getDevAppInfo",
"method": "get",
"params": {
"type": "map",
"value": {
"appId": {
"type": "env",
"value": "appID"
}
}
}
},
"output": {
"success": [
"4abafb99-df41-4378-8c4d-37acbc489d5b"
],
"failed": [
"2bc1c4ea-5301-40ab-8dca-d2818c4732e4"
]
}
},
"123fc8e9-6b60-45d5-8e54-4ccfec181619": {
"uuid": "123fc8e9-6b60-45d5-8e54-4ccfec181619",
"meta": "duiba-api",
"design": {
"x": 228,
"y": 310,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 75.5
}
],
"failed": [
{
"x": 124.5,
"y": 89.5
}
]
}
},
"props": {
"url": {
"type": "static",
"value": "/aaw/projectx/getAppWechatInfo"
},
"name": "getAppWechatInfo",
"method": "get",
"params": {
"type": "map",
"value": {
"appId": {
"type": "env",
"value": "appID"
}
}
}
},
"output": {
"failed": [
"2bc1c4ea-5301-40ab-8dca-d2818c4732e4"
]
}
},
"e8c7c2d5-fc7e-444a-89f2-252cb8cd6b25": {
"uuid": "e8c7c2d5-fc7e-444a-89f2-252cb8cd6b25",
"meta": "541c8476-34bf-4c5d-805e-2e4906791cb6",
"design": {
"x": -169,
"y": 100,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"abfd8d40-2ba6-4227-8f71-eb12d4c993a3"
],
"p1": [
"3acb15f0-5e7c-453e-8d74-459b0c27c0cf"
]
}
},
"abfd8d40-2ba6-4227-8f71-eb12d4c993a3": {
"uuid": "abfd8d40-2ba6-4227-8f71-eb12d4c993a3",
"meta": "c4f60371-5a9a-4f02-92c9-1f24d310c68a",
"design": {
"x": 18,
"y": 23,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 33
}
],
"failed": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {},
"output": {
"success": [
"2a88bbc9-6d81-43d7-ad1a-a129a9f7e8e6"
],
"failed": [
"8e6024ea-574e-49d0-99f8-13719f7b2c12"
]
}
},
"3acb15f0-5e7c-453e-8d74-459b0c27c0cf": {
"uuid": "3acb15f0-5e7c-453e-8d74-459b0c27c0cf",
"meta": "63f6956c-1a4f-4395-aeb2-2790b10df37d",
"design": {
"x": 18,
"y": 172,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"yes": [
{
"x": 124.5,
"y": 24.5
}
],
"no": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"yes": [
"38471b30-788a-4384-abe3-02961eaa246d"
],
"no": [
"123fc8e9-6b60-45d5-8e54-4ccfec181619"
]
}
},
"4abafb99-df41-4378-8c4d-37acbc489d5b": {
"uuid": "4abafb99-df41-4378-8c4d-37acbc489d5b",
"meta": "59bb3740-de75-4ef8-b1c0-244103d9b69a",
"design": {
"x": 550,
"y": 226,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {}
},
"props": {},
"output": {}
},
"8e6024ea-574e-49d0-99f8-13719f7b2c12": {
"uuid": "8e6024ea-574e-49d0-99f8-13719f7b2c12",
"meta": "63f6956c-1a4f-4395-aeb2-2790b10df37d",
"design": {
"x": 590,
"y": 71,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"yes": [
{
"x": 124.5,
"y": 24.5
}
],
"no": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"no": [
"971ab334-faeb-4a70-964c-c62f8b97920a"
]
}
},
"d5ed77ee-4774-4395-aa4a-60301ba4561f": {
"uuid": "d5ed77ee-4774-4395-aa4a-60301ba4561f",
"meta": "464fc17d-ab77-4ef7-b6ce-7501a4847d23",
"design": {
"x": 429,
"y": -31,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
},
"2bc1c4ea-5301-40ab-8dca-d2818c4732e4": {
"uuid": "2bc1c4ea-5301-40ab-8dca-d2818c4732e4",
"meta": "464fc17d-ab77-4ef7-b6ce-7501a4847d23",
"design": {
"x": 502,
"y": 314,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
},
"971ab334-faeb-4a70-964c-c62f8b97920a": {
"uuid": "971ab334-faeb-4a70-964c-c62f8b97920a",
"meta": "0fa05fb3-c179-461b-b088-de0e3be40449",
"design": {
"x": 799,
"y": 136,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "a75eb5c6-b147-4b19-97eb-a31cf7667fff",
"metas": [
{
"id": "b283de43-2d3a-4721-965f-90c8a70c5162",
"script": "if(global.dataCenter.store.coop_config[\"rpb.lipstick.share.appShareWay\"]==\"true\"||global.dataCenter.store.coop_config[\"rpb.lipstick.share.officalAccountShareWay\"]==\"true\"){\n if(engine.env.shareUrl.indexOf(\"shareCode\")==-1){\n engine.env.shareUrl+=`&shareCode=${args.raw.shareCode}`\n }\n}\nnext(\"success\",args)",
"props": {},
"isInline": true,
"from": "custom",
"name": "拼接shareCode",
"output": [
"success"
],
"sub": {
"f1fad633-f8eb-4ed4-9c8f-3bc4b470f801": {
"uuid": "f1fad633-f8eb-4ed4-9c8f-3bc4b470f801",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "f1fad633-f8eb-4ed4-9c8f-3bc4b470f801"
},
{
"id": "541c8476-34bf-4c5d-805e-2e4906791cb6",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "c4f60371-5a9a-4f02-92c9-1f24d310c68a",
"script": "if(props.hasShareRequest){\n next(\"success\",args)\n}else{\n next(\"failed\",args)\n}",
"props": {
"hasShareRequest": {
"type": "boolean",
"enum": [],
"default": true,
"alias": "是否配置分享模块"
}
},
"isInline": true,
"from": "custom",
"name": "是否配置分享模块",
"output": [
"success",
"failed"
]
},
{
"id": "63f6956c-1a4f-4395-aeb2-2790b10df37d",
"script": "if(engine.env.channelType==\"1\"){\n next(\"yes\",args)\n}else{\n next(\"no\",args)\n}",
"props": {},
"isInline": true,
"from": "custom",
"name": "是否为app渠道",
"output": [
"yes",
"no"
]
},
{
"id": "59bb3740-de75-4ef8-b1c0-244103d9b69a",
"script": "if(!global.loginCodeState){\n global.loginCodeState=1\n window[\"$\"](\"body\").append(args.appLoginJs)\n var u = navigator.userAgent;\n var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端\n if(isAndroid){\n window[\"$\"](\"body\").append(args.androidShareJs)\n }else{\n window[\"$\"](\"body\").append(args.iosShareJs)\n }\n}",
"props": {},
"isInline": true,
"from": "custom",
"name": "生成分享方法",
"output": []
},
{
"id": "464fc17d-ab77-4ef7-b6ce-7501a4847d23",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "接口异常Toast",
"output": [
"success",
"failed"
],
"sub": {
"557c28e1-568b-49cf-a145-c48f9f180ab8": {
"uuid": "557c28e1-568b-49cf-a145-c48f9f180ab8",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"4baae08e-0691-4a65-8e3f-6460d1547a15"
]
}
},
"4baae08e-0691-4a65-8e3f-6460d1547a15": {
"uuid": "4baae08e-0691-4a65-8e3f-6460d1547a15",
"meta": "974da71f-8a91-495f-be6c-8e521dd82df4",
"design": {
"x": 230,
"y": 82,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38.5
}
]
}
},
"props": {},
"output": {
"failed": [
"fc8aab82-772f-4d76-813a-0bec9b3e0760"
]
}
},
"fc8aab82-772f-4d76-813a-0bec9b3e0760": {
"uuid": "fc8aab82-772f-4d76-813a-0bec9b3e0760",
"meta": "9e196854-4c2d-4784-afc8-e8dcb17c79c2",
"design": {
"x": 412,
"y": 164,
"input": {
"default": [
{
"x": 5.5,
"y": 56.5
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 49.5
}
],
"p1": [
{
"x": 124.5,
"y": 63.5
}
]
}
},
"props": {},
"output": {
"p0": [
"efe82744-e381-4cdc-964d-651f516545a4"
],
"p1": [
"197e1d2f-21e6-4568-b0f7-4b8405ad6e9b"
]
}
},
"efe82744-e381-4cdc-964d-651f516545a4": {
"uuid": "efe82744-e381-4cdc-964d-651f516545a4",
"meta": "show-toast",
"design": {
"x": 657,
"y": 131,
"input": {
"default": [
{
"x": 5.5,
"y": 82.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 82.5
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200,
"viewName": ""
},
"output": {}
},
"197e1d2f-21e6-4568-b0f7-4b8405ad6e9b": {
"uuid": "197e1d2f-21e6-4568-b0f7-4b8405ad6e9b",
"meta": "wait",
"design": {
"x": 654,
"y": 363,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"duration": 1000
},
"output": {
"complete": [
"cc6a31a2-cf54-4397-aca0-e17f9c19b441"
]
}
},
"cc6a31a2-cf54-4397-aca0-e17f9c19b441": {
"uuid": "cc6a31a2-cf54-4397-aca0-e17f9c19b441",
"meta": "990b7cff-5817-484c-8b96-57a1fc194676",
"design": {
"x": 869,
"y": 376,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "557c28e1-568b-49cf-a145-c48f9f180ab8",
"metas": [
{
"id": "974da71f-8a91-495f-be6c-8e521dd82df4",
"script": "console.log(args)\nif(!args){\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n}else{\n if(args.message){\n if(args.code!='100001'){\n next(\"failed\",{text:args.message})\n }\n }else{\n next(\"failed\",{text:\"当前网络有些开小差,请稍等\"})\n }\n}\n\n",
"props": {},
"isInline": true,
"from": "custom",
"name": "判错逻辑",
"output": [
"success",
"failed"
]
},
{
"id": "9e196854-4c2d-4784-afc8-e8dcb17c79c2",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
},
{
"id": "990b7cff-5817-484c-8b96-57a1fc194676",
"script": "next(\"success\")",
"props": {},
"isInline": true,
"from": "custom",
"name": "结束",
"output": [
"success"
]
}
]
},
{
"id": "0fa05fb3-c179-461b-b088-de0e3be40449",
"script": "",
"props": {},
"isInline": true,
"from": "custom",
"name": "初始化微信分享",
"output": [
"success",
"failed"
],
"sub": {
"f48cbb42-5672-4ea2-9329-3b1c7c448621": {
"uuid": "f48cbb42-5672-4ea2-9329-3b1c7c448621",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"85c9cf91-f94d-4be2-a776-6ce88a5e8733"
]
}
},
"85c9cf91-f94d-4be2-a776-6ce88a5e8733": {
"uuid": "85c9cf91-f94d-4be2-a776-6ce88a5e8733",
"meta": "init-weixin-env",
"design": {
"x": 253,
"y": 72,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 40
}
]
}
},
"props": {
"debug": false
},
"output": {
"success": [
"ac5445fa-dbd9-4610-9cd4-6ce7f2b2d826"
]
}
},
"ac5445fa-dbd9-4610-9cd4-6ce7f2b2d826": {
"uuid": "ac5445fa-dbd9-4610-9cd4-6ce7f2b2d826",
"meta": "78e53207-b558-4344-8385-e8df8eba6bfe",
"design": {
"x": 529,
"y": 140,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 33
}
],
"failed": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"update": true
},
"output": {}
}
},
"subEntry": "f48cbb42-5672-4ea2-9329-3b1c7c448621",
"metas": [
{
"id": "78e53207-b558-4344-8385-e8df8eba6bfe",
"script": "",
"props": {
"update": {
"type": "boolean",
"enum": []
}
},
"isInline": true,
"from": "custom",
"name": "微信分享操作",
"output": [
"success",
"failed"
],
"sub": {
"608177d2-eb20-4334-b718-205144d60c48": {
"uuid": "608177d2-eb20-4334-b718-205144d60c48",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
]
}
},
"props": {},
"output": {
"success": [
"0bdc725d-a906-4b3a-ab43-53c0f75b9221"
]
}
},
"0bdc725d-a906-4b3a-ab43-53c0f75b9221": {
"uuid": "0bdc725d-a906-4b3a-ab43-53c0f75b9221",
"meta": "share-preprocessing",
"design": {
"x": 201,
"y": 51,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"ee4390b8-ae46-4000-b139-c6060d1f1316"
]
}
},
"ee4390b8-ae46-4000-b139-c6060d1f1316": {
"uuid": "ee4390b8-ae46-4000-b139-c6060d1f1316",
"meta": "env-judge",
"design": {
"x": 419,
"y": 93,
"input": {
"default": [
{
"x": 5.5,
"y": 31.5
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"1503216d-be13-484c-92f3-d8168f076674"
]
}
},
"1503216d-be13-484c-92f3-d8168f076674": {
"uuid": "1503216d-be13-484c-92f3-d8168f076674",
"meta": "share-weixin",
"design": {
"x": 651,
"y": 95,
"input": {
"default": [
{
"x": 5.5,
"y": 40
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 19
}
],
"failed": [
{
"x": 124.5,
"y": 33
}
],
"pass": [
{
"x": 124.5,
"y": 47
}
],
"guide": [
{
"x": 124.5,
"y": 61
}
]
}
},
"props": {
"update": {
"type": "link"
}
},
"output": {}
}
},
"subEntry": "608177d2-eb20-4334-b718-205144d60c48"
}
]
}
],
"isPrefab": true
}
\ No newline at end of file
if (window['getPxToken']) {
window['getPxToken'](function (e, token) {
switch (e) {
case 'net error':
next('error', {type: 'error'});
break;
case 'need login':
next('failed', {type: 'failed'});
break;
case 'state invalid':
next('invalid', {type: 'invalid'});
break;
default:
if(token){
scope.token = token;
next('success', args);
}else{
next('invalid', {type: 'invalid key'});
}
}
});
} else {
next('error', {type: 'no ready'});
}
{
"name": "获取星速台Token",
"props": {
"comment": {
"type": "string",
"alias": "星速台通用token"
}
},
"output": [
"success",
"failed",
"invalid",
"error"
]
}
\ No newline at end of file
...@@ -2,22 +2,19 @@ ...@@ -2,22 +2,19 @@
* Created by rockyl on 2019-11-16. * Created by rockyl on 2019-11-16.
*/ */
if(props.closeAll){ if(props.popAll){
if (!props.viewName) { if (!props.viewName) {
console.log('没有设置视图名'); console.log('没有设置视图名');
next('exception', '没有设置视图名'); next('exception', '没有设置视图名');
}else{ }else{
let gameStage = engine.gameStage; let gameStage = engine.gameStage;
let viewConfig = gameStage.getViewConfigByName(props.viewName); let view = gameStage.instantiateView(props.viewName);
if (viewConfig) { if (view) {
let view = engine.instantiate(viewConfig); gameStage.sceneContainer.popAll(view);
gameStage.sceneContainer.push(view); next('complete');
} else { }else{
console.error('view config not exists'); next('exception', '视图不存在');
} }
next('complete');
} }
}else{ }else{
engine.gameStage.sceneContainer.pop(); engine.gameStage.sceneContainer.pop();
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
} }
}, },
"output": [ "output": [
"complete" "complete",
"exception"
] ]
} }
\ No newline at end of file
...@@ -21,6 +21,7 @@ export default class BuriedPoint extends engine.ScriptBase { ...@@ -21,6 +21,7 @@ export default class BuriedPoint extends engine.ScriptBase {
private _autoExposured = false; private _autoExposured = false;
private _hostVisible = false; private _hostVisible = false;
private _timer;
onModify(value, key, oldValue) { onModify(value, key, oldValue) {
switch (key) { switch (key) {
...@@ -36,7 +37,15 @@ export default class BuriedPoint extends engine.ScriptBase { ...@@ -36,7 +37,15 @@ export default class BuriedPoint extends engine.ScriptBase {
this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this); this.host.addEventListener(engine.MouseEvent.CLICK, this._onClick, this);
//this.host.addEventListener(engine.Event.VISIBLE, this._onVisible, this); //this.host.addEventListener(engine.Event.VISIBLE, this._onVisible, this);
setInterval(this.checkVisibility, 1000 / this.checkFps); this._timer = setInterval(this.checkVisibility, 1000 / this.checkFps);
}
destroy(): void {
this.host.removeEventListener(engine.MouseEvent.CLICK, this._onClick, this);
if (this._timer) {
clearInterval(this._timer);
this._timer = null;
}
} }
awake(): void { awake(): void {
...@@ -55,7 +64,7 @@ export default class BuriedPoint extends engine.ScriptBase { ...@@ -55,7 +64,7 @@ export default class BuriedPoint extends engine.ScriptBase {
let worldVisible = this.host.worldVisible; let worldVisible = this.host.worldVisible;
if (worldVisible !== this._hostVisible) { if (worldVisible !== this._hostVisible) {
this._hostVisible = worldVisible; this._hostVisible = worldVisible;
if(worldVisible){ if (worldVisible) {
this._onVisible(); this._onVisible();
} }
} }
...@@ -90,7 +99,7 @@ export default class BuriedPoint extends engine.ScriptBase { ...@@ -90,7 +99,7 @@ export default class BuriedPoint extends engine.ScriptBase {
dcm: this['__dcm'], dcm: this['__dcm'],
dom: this['__dom'], dom: this['__dom'],
}); });
if(this.id !== undefined){ if (this.id !== undefined) {
engine.globalEvent.dispatchEvent('buried-point-success', { engine.globalEvent.dispatchEvent('buried-point-success', {
type, type,
id: this.id, id: this.id,
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
export default class ZoomScroll extends engine.ScriptBase { export default class ZoomScroll extends engine.ScriptBase {
static id = 'zoom-scroll'; static id = 'zoom-scroll';
autoInit: boolean = true;
duration: number = 1000; duration: number = 1000;
@engine.dirtyFieldTrigger @engine.dirtyFieldTrigger
index: number = 0; index: number = 0;
...@@ -28,8 +29,10 @@ export default class ZoomScroll extends engine.ScriptBase { ...@@ -28,8 +29,10 @@ export default class ZoomScroll extends engine.ScriptBase {
mounted() { mounted() {
this._centerOffset = this.host.width / 2; this._centerOffset = this.host.width / 2;
this.init();
this.host.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDragStart, this); if(this.autoInit){
this.init();
}
} }
sleep(): void { sleep(): void {
...@@ -49,6 +52,7 @@ export default class ZoomScroll extends engine.ScriptBase { ...@@ -49,6 +52,7 @@ export default class ZoomScroll extends engine.ScriptBase {
} }
this.scrollTo(0, false); this.scrollTo(0, false);
this.host.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDragStart, this);
} }
updateOffset(offset) { updateOffset(offset) {
......
{ {
"name": "缩放滚动", "name": "缩放滚动",
"props": { "props": {
"autoInit": {
"alias": "自动初始化",
"type": "boolean",
"default": true
},
"duration": { "duration": {
"alias": "时间", "alias": "时间",
"type": "number", "type": "number",
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
"removeComments": true, "removeComments": true,
"noEmitOnError": true, "noEmitOnError": true,
"noEmitHelpers": true, "noEmitHelpers": true,
"declarationDir": "types",
"declaration": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"outDir": "dist", "outDir": "dist",
"lib": [ "lib": [
......
export default class Block extends engine.Container {
private body;
type: any;
dir: any;
constructor();
reset({ type, }: {
type: any;
}): void;
playEnter(index: any, animation: any): Promise<{}>;
playLeave(): void;
playEffect(): void;
stop(): void;
}
import Block from "./Block";
import { Background } from "./Background";
import Player from "./Player";
import { Base } from "./Base";
import { GuideLayer } from "./GuideLayer";
export default class GameView extends engine.Container {
background: Background;
base: Base;
frontContainer: engine.Container;
blockContainer: engine.Container;
guideLayer: GuideLayer;
player: Player;
hitEffect: svga.Svga;
currentBlock: Block;
needHitTest: any;
index: number;
blockComplete: any;
baseOffset: number;
timer: any;
_pos: any;
_score: any;
_remainToShowGoldBag: any;
lastLandType: any;
_touchEnabled: any;
private _hasSetup;
constructor();
setup(): void;
reset(revive?: boolean): Promise<void>;
resetPlayer(revive?: boolean): Promise<void>;
start(revive?: boolean): Promise<void>;
pause(): void;
resume(): void;
revive(): Promise<void>;
addBlock(animation?: boolean): void;
private goldBags;
addGoldBag(): void;
private nextToUpdateScore;
playOpenGoldBag(): Promise<void>;
onPlayerJumpOnTop(): void;
readonly blockCount: number;
pos: any;
updatePos(): void;
private onEnterFrame;
onHitOn(dir: any): Promise<void>;
jump(): Promise<void>;
private scoreChange;
playHitEffect(dir: any): void;
playZoom(type: 'in' | 'out', duration?: number): Promise<{}>;
playShake(): Promise<{}>;
}
export declare class GoldBag extends engine.Container {
private svga;
private avatar;
remain: number;
constructor();
setup(): void;
reset(data: any): void;
playOpen(): Promise<{}>;
}
export declare class JumpHigh extends engine.Container {
private _status;
private _gameView;
constructor();
reset(): void;
start(event: engine.Event): void;
pause(): void;
resume(): void;
revive(): void;
private onTap;
}
export default class Player extends engine.Container {
private jumpPromise;
private playing;
private vy;
private g;
private baseY;
private aboveBlock;
private _aniName;
private _currentAni;
private _prefectLandCounting;
private aniJump;
private aniFall;
private aniLandNormal;
private aniLandSide;
private aniHit;
private aniParachute;
private prefectEffect;
private landEffect;
constructor();
switchAni(name: any, dir?: number, play?: boolean, loop?: boolean): Promise<{}>;
setup(): void;
reset(revive: any): void;
playReady(): Promise<{}>;
private onEnterFrame;
changeBaseY(v: any): void;
jump(): Promise<{}>;
playLand(type: any, dir: any): Promise<void>;
hitAway(dir: any): Promise<void>;
parachute(dir: any): Promise<{}>;
}
export declare function getTexture(uuid: any): engine.Texture;
export declare function getTextureByName(name: any): engine.Texture;
export declare function getBlockAsset(type: any): any;
export declare function createSvga(name: any, anchorName: any): svga.Svga;
export declare function playSound(name: any): void;
import { JumpHigh } from "./game/JumpHigh";
export default function (props: any): JumpHigh;
export declare class Background extends engine.Container {
private _bg;
private _minScale;
constructor();
setup(): void;
playZoom(type: 'in' | 'out', duration?: number): Promise<{}>;
}
export declare class Base extends engine.Image {
constructor();
setup(): void;
reset(): void;
}
export default class Block extends engine.Container {
private body;
type: any;
dir: any;
constructor();
reset({ type, }: {
type: any;
}): void;
playEnter(index: any, animation: any): Promise<{}>;
playLeave(): void;
playEffect(): void;
stop(): void;
}
import { Turntable } from "./Turntable";
export declare class BreakUpPart extends engine.Container {
private _body;
private _turntable;
private _from;
private _to;
private _fromR;
private _toR;
constructor(turntable: Turntable, from: any, to: any);
updateMask(): void;
playFall(rotation: any): Promise<{}>;
readonly body: engine.Image;
}
import { GuideLayer } from "./GuideLayer";
import { Turntable } from "./Turntable";
export default class GameView extends engine.Container {
turntable: Turntable;
guideLayer: GuideLayer;
private _counting;
_touchEnabled: any;
private _hasSetup;
private _countdown;
private _stick;
private _timer;
constructor();
setup(): void;
reset(revive?: boolean, options?: any): Promise<void>;
start(): Promise<void>;
startCountDown(): void;
stopCountDown(): void;
prepareStick(): void;
recycleStick(): void;
pause(): void;
resume(): void;
revive(): Promise<void>;
private countDownStep;
private onTimeout;
private onHit;
tap(e: any): void;
}
export declare class GameWrapper extends engine.Container {
private _status;
private _gameView;
private _touchLayer;
constructor();
private onAddedToStage;
reset(event: engine.Event): void;
start(event: engine.Event): void;
pause(): void;
resume(): void;
revive(): void;
clear(): void;
private onTap;
}
export declare class GoldBag extends engine.Container {
private svga;
constructor();
setup(): void;
reset(data: any): void;
playOpen(): Promise<{}>;
}
export declare class GuideLayer extends engine.Container {
private guideMask;
private label;
constructor();
private setup;
show(id: any, options: any): Promise<{}>;
createRect(container: any, x: any, y: any, width: any, height: any): void;
}
export declare class JumpHigh extends engine.Container {
private _status;
private _gameView;
constructor();
reset(): void;
start(event: engine.Event): void;
pause(): void;
resume(): void;
revive(): void;
private onTap;
}
export declare class LipstickTurntable extends engine.Container {
private _status;
private _gameView;
constructor();
reset(): void;
start(event: engine.Event): void;
pause(): void;
resume(): void;
revive(): void;
private onTap;
}
export declare class LispstickTurntable extends engine.Container {
private _status;
private _gameView;
constructor();
reset(): void;
start(event: engine.Event): void;
pause(): void;
resume(): void;
revive(): void;
private onTap;
}
export declare class LisptickTurntable extends engine.Container {
private _status;
private _gameView;
constructor();
reset(): void;
start(event: engine.Event): void;
pause(): void;
resume(): void;
revive(): void;
private onTap;
}
export default class Player extends engine.Container {
private jumpPromise;
private playing;
private vy;
private g;
private baseY;
private aboveBlock;
private _aniName;
private _currentAni;
private _prefectLandCounting;
private aniJump;
private aniFall;
private aniLandNormal;
private aniLandPrefect;
private aniLandSide;
private aniHit;
private aniParachute;
constructor();
switchAni(name: any, dir?: number, play?: boolean, loop?: boolean): Promise<{}>;
setup(): void;
reset(): void;
private onEnterFrame;
changeBaseY(v: any): void;
jump(): Promise<{}>;
playLand(type: any, dir: any): Promise<void>;
hitAway(dir: any): Promise<void>;
parachute(): Promise<{}>;
}
export declare class Stick extends engine.Container {
private _body;
private _toY;
constructor();
reset(): void;
playSend(y: any, callback: any): void;
stopSend(): void;
playFall(): Promise<{}>;
anchorOffsetY: any;
}
import { Stick } from "./Stick";
export declare class Turntable extends engine.Container {
private _wrapper;
private _stickContainer;
private _body;
private _breakUpContainer;
private _dir;
private _radius;
private _items;
private rotationRange;
constructor();
private resetAsset;
reset(options: any): void;
readonly radius: any;
start(): void;
pause(): void;
resume(): void;
addStick(stick: Stick): boolean;
parseAngle(r: any): number;
hideSticks(): void;
playBreakUp(): Promise<void>;
private shake;
private rotateOnce;
}
export declare function getTexture(uuid: any): engine.Texture;
export declare function getTextureByName(name: any): engine.Texture;
export declare function playSound(name: any): void;
import { GameWrapper } from "./game/GameWrapper";
export default function (props: any): GameWrapper;
export declare let props: any;
export declare function prepareProps(): void;
export declare function injectProps(p: any): void;
import GameObject from "./GameObject";
import Collider from "../Phycics/Collider";
export default class Car extends GameObject {
private imgParticel;
private fireTimer;
touchWall: 1 | -1 | 0;
onDied: () => void;
private isDied;
private fireParticleTimer;
private invincible;
private rowBulletNum;
private fireSpeed;
private collider;
constructor();
private fire;
private die;
onCollisionEnter(other: Collider): void;
onCollisionStay(other: Collider): void;
private onceBlink;
revive(): void;
move(deltaX: number): void;
onCollisionExit(other: Collider): void;
private onUpdate;
}
export default class GuideMask extends engine.Container {
constructor(index: number, x1: number, y1: number);
onClick: (context: GuideMask) => void;
}
export declare namespace MConfigs {
function updateConfig(): void;
const size: number[];
const drop: {
[key: number]: {
type: "bullet" | "power";
value: number;
textColor: number;
fileIndex: string;
};
};
const dropPool: {
0: {
num: number;
factor: {
0: number;
1: number;
2: number;
3: number;
4: number;
};
};
1: {
num: number;
factor: {
0: number;
1: number;
2: number;
3: number;
4: number;
};
};
2: {
num: number;
factor: {
0: number;
1: number;
2: number;
3: number;
4: number;
};
};
};
const guide: {
[key: number]: {
mask: string;
text: {
str: string;
offsetToMask: {
x: number;
y: number;
};
};
};
};
}
export default class GuideMgr {
private static _instance;
static readonly instance: GuideMgr;
guideFlag: boolean;
private done;
readonly guideDone: boolean;
private currentGuideMask;
runGuide(index: number, x: number, y: number, end?: boolean): void;
}
import Game from "./Game/Game";
export declare class ShootPlanet extends engine.Container {
game: Game;
constructor();
onActive(): void;
onSleep(): void;
onRevive(): void;
onPause(): void;
onResume(): void;
private init;
private customProperty;
}
import { ShootPlanet } from "./game/ShootPlanet";
export default function (props: any): ShootPlanet;
export declare let props: any;
export declare function prepareProps(): void;
export declare function injectProps(p: any): void;
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