Commit 15f1811a authored by wildfirecode's avatar wildfirecode

1

parent 53727adb
This diff is collapsed.
......@@ -47,7 +47,7 @@ function launchWithCustomModule(customModule) {
setTimeout(() => {
engine.globalEvent.dispatchEvent('pictures-start', {
picUrl: "http://yun.duiba.com.cn/aurora/assets/fb06e66c26f17b00f677367bd7571a1aa9b1ade4.png"
picUrl: "http://yun.duiba.com.cn/aurora/assets/e1593b97c27077b85b92f7eaaeae1ed64a1eb79a.png"
});
}, 500);
......
......@@ -15,9 +15,9 @@
//# sourceMappingURL=props.js.map
var qietu = (function (parent, url, MAX_COL, MAX_ROW) {
var W = 600;
var H = 600;
var GAP = 10;
var W = props.W;
var H = props.H;
var GAP = props.GAP;
var spr = [];
var pos = [];
var _loop_1 = function (row) {
......@@ -200,6 +200,7 @@
};
return GameView;
}(engine.Container));
//# sourceMappingURL=GameView.js.map
var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super);
......
This diff is collapsed.
......@@ -5,22 +5,22 @@
"MAX_COL": {
"alias": "图片分成几列",
"type": "number",
"default": 2
"default": 4
},
"MAX_ROW": {
"alias": "图片分成几行",
"type": "number",
"default": 2
"default": 4
},
"W": {
"alias": "图片的宽度",
"type": "number",
"default": 600
"default": 618
},
"H": {
"alias": "图片的高度",
"type": "number",
"default": 600
"default": 827
},
"GAP": {
"alias": "图片间隙",
......@@ -44,28 +44,15 @@
],
"events": {
"in": {
"pictures-reset": {
"alias": "重置",
"pictures-start": {
"alias": "开始",
"data": {
"goodsProbability": "[0.2,0.5,0.3]道具概率(雨滴、石头、炸弹),所有概率相加为1",
"countDown": "倒计时(s)",
"acceleratedSpeed":"道具掉落加速度(单位:每秒)"
"picUrl":"图片路径"
}
},
"pictures-start": {
"alias": "开始"
},
"pictures-revive": {
"alias": "复活"
},
"pictures-pause": {
"alias": "暂停"
},
"pictures-resume": {
"alias": "恢复"
},
"pictures-clear": {
"alias": "清空,通过reset事件恢复"
"pictures-stop": {
"alias": "停止"
}
},
"out": {
......
export default (parent, url,MAX_COL,MAX_ROW) => {
import { props } from "../props";
export default (parent, url, MAX_COL, MAX_ROW) => {
const W = 600;
const H = 600;
const GAP = 10;
const W = props.W;
const H = props.H;
const GAP = props.GAP;
const spr = [];
const pos = []
......@@ -18,7 +19,7 @@ export default (parent, url,MAX_COL,MAX_ROW) => {
parent.addChild(child);
child.x = col * (W / MAX_COL + GAP);
child.y = row * (H / MAX_ROW + GAP);
pos.push([child.x,child.y]);
pos.push([child.x, child.y]);
child.addEventListener(engine.Event.COMPLETE, () => {
const uvs = new Float32Array([
col / MAX_COL,
......@@ -37,5 +38,5 @@ export default (parent, url,MAX_COL,MAX_ROW) => {
}
}
// console.log(spr);
return [spr,pos];
return [spr, pos];
};
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