Commit 15f1811a authored by wildfirecode's avatar wildfirecode

1

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