Commit 636a22bd authored by rockyl's avatar rockyl

补充

parent 1695a8f5
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"output": [ "output": [
"complete" "complete"
], ],
"id": "close-dialog", "id": "pop-dialog",
"script": "if (props.closeAll) {\n engine.gameStage.popupContainer.popAll();\n}\nelse {\n engine.gameStage.popupContainer.pop();\n}\n", "script": "if (props.closeAll) {\n engine.gameStage.popupContainer.popAll();\n}\nelse {\n engine.gameStage.popupContainer.pop();\n}\n",
"group": "base", "group": "base",
"type": "builtin" "type": "builtin"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"output": [ "output": [
"complete" "complete"
], ],
"id": "show-dialog", "id": "push-dialog",
"script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\n var gameStage = engine.gameStage;\n var viewConfig = gameStage.getViewConfigByName(props.viewName);\n if (viewConfig) {\n var view = engine.instantiate(viewConfig);\n gameStage.popupContainer.push(view, { center: props.center || true });\n }\n else {\n console.error('view config not exists');\n }\n}\n", "script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\n var gameStage = engine.gameStage;\n var viewConfig = gameStage.getViewConfigByName(props.viewName);\n if (viewConfig) {\n var view = engine.instantiate(viewConfig);\n gameStage.popupContainer.push(view, { center: props.center || true });\n }\n else {\n console.error('view config not exists');\n }\n}\n",
"group": "base", "group": "base",
"type": "builtin" "type": "builtin"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"output": [ "output": [
"complete" "complete"
], ],
"id": "show-scene", "id": "push-scene",
"script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\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}\n", "script": "if (!props.viewName) {\n console.log('没有设置视图名');\n next('exception', '没有设置视图名');\n}\nelse {\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}\n",
"group": "base", "group": "base",
"type": "builtin" "type": "builtin"
......
{
"name": "设置可否交互",
"desc": "设置可否交互",
"props": {
"target": {
"type": "node",
"alias": "目标节点"
},
"enabled": {
"type": "boolean",
"alias": "可否交互",
"default": false
}
},
"output": [
"success"
],
"id": "set-mouse-enabled",
"script": "var targetNode = target || props.target;\nif (targetNode) {\n targetNode.mouseEnabled = props.enabled;\n next('success');\n}\n",
"group": "base",
"type": "builtin"
}
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
} }
}, },
"props": { "props": {
"url": "$_linked_$", "url": {},
"method": "$_linked_$" "method": {}
}, },
"output": { "output": {
"success": [ "success": [
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
} }
}, },
"props": { "props": {
"name": "$_linked_$" "name": {}
}, },
"output": {} "output": {}
} }
......
{ {
"name": "跳转到中奖记录", "name": "跳转到中奖记录",
"desc": "跳转到中奖记录页面",
"props": {}, "props": {},
"output": [ "output": [
"success" "success"
......
...@@ -25,8 +25,10 @@ function compileProcess(sourcePath, output, isBuiltin) { ...@@ -25,8 +25,10 @@ function compileProcess(sourcePath, output, isBuiltin) {
} }
const outputPath = path.join(output, sourcePath + '.json'); const outputPath = path.join(output, sourcePath + '.json');
fs.ensureDir(path.dirname(outputPath)); fs.ensureDirSync(path.dirname(outputPath));
fs.writeJsonSync(outputPath, meta, {spaces: ' '}); fs.writeJsonSync(outputPath, meta, {spaces: ' '});
console.log(`compile process [${sourcePath}] successfully!`);
} }
const [_, __, sourcePath, outputPath = 'dist', builtin] = process.argv; const [_, __, sourcePath, outputPath = 'dist', builtin] = process.argv;
......
/**
* Created by rockyl on 2019-11-16.
*/
let targetNode = target || props.target;
if(targetNode){
targetNode.mouseEnabled = props.enabled;
next('success')
}
\ No newline at end of file
{
"name": "设置可否交互",
"desc": "设置可否交互",
"props": {
"target": {
"type": "node",
"alias": "目标节点"
},
"enabled": {
"type": "boolean",
"alias": "可否交互",
"default": false
}
},
"output": [
"success"
]
}
\ No newline at end of file
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
} }
}, },
"props": { "props": {
"url": "$_linked_$", "url": {},
"method": "$_linked_$" "method": {}
}, },
"output": { "output": {
"success": [ "success": [
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
} }
}, },
"props": { "props": {
"name": "$_linked_$" "name": {}
}, },
"output": {} "output": {}
} }
......
{ {
"name": "跳转到中奖记录", "name": "跳转到中奖记录",
"desc": "跳转到中奖记录页面",
"props": { "props": {
}, },
......
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