Commit 1b966ad1 authored by Chary's avatar Chary

start event add params

parent 7da17f99
This diff is collapsed.
......@@ -49,6 +49,9 @@ function launchWithCustomModule(customModule) {
engine.globalEvent.dispatchEvent('pictures-start', {
picUrl: "http://yun.duiba.com.cn/aurora/assets/e1593b97c27077b85b92f7eaaeae1ed64a1eb79a.png",
blockUrl: "888",
column:"2",
row:"2",
gameTime:"50"
});
const d = engine.gameStage.sceneContainer.getChildAt(0);
......
This diff is collapsed.
This diff is collapsed.
......@@ -59,7 +59,10 @@
"alias": "开始",
"data": {
"picUrl":"图片路径",
"blockUrl":"blockUrl"
"blockUrl":"blockUrl",
"row":"行",
"column":"列",
"gameTime":"游戏时间"
}
},
"pictures-stop": {
......
......@@ -27,7 +27,12 @@ export default class GameView extends engine.Container {
private date
start() {
//优先获取start事件接收到的参数
MAX_COL = props.column || props.MAX_COL;
MAX_ROW = props.row || props.MAX_ROW;
GAME_TIME = props.gameTime || props.GAME_TIME;
console.log('start',props.column,props.row,props.gameTime)
if (!this.guideHole) {
this.guideHole = new engine.Image();
this.guideHole.source = 'asset://' + props.blockUrl;
......
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