Commit 69017731 authored by 汪欢's avatar 汪欢

拼图0.4

parent 24d78c4c
This diff is collapsed.
......@@ -12,7 +12,6 @@
function injectProps(p) {
engine.injectProp(props, p);
}
//# sourceMappingURL=props.js.map
var picMap = {};
var posMap = {};
......@@ -60,7 +59,6 @@
posMap[url] = pos.concat([]);
return [spr, pos];
});
//# sourceMappingURL=qietu.js.map
function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
......@@ -78,7 +76,6 @@
return .5 - Math.random();
});
}
//# sourceMappingURL=utils.js.map
var MAX_COL;
var MAX_ROW;
......@@ -103,6 +100,7 @@
});
var result = qietu(this.picturesWrapper, props.picUrl, MAX_COL, MAX_ROW);
this.picturesWrapper.addChild(this.guideHole);
console.log(this.picturesWrapper);
this.pictures = result[0];
this.rightList = this.pictures.concat([]);
var posList = result[1];
......@@ -230,10 +228,13 @@
GameView.prototype.onMove = function (e) {
this.dragPic.x = e.stageX - this.localPicX;
this.dragPic.y = e.stageY - this.localPicY;
console.log(this.dragPic.x, this.dragPic.y);
this.centerX = this.dragPic.x + w / 2;
this.centerY = this.dragPic.y + h / 2;
};
GameView.prototype.onClk = function (e) {
this._timeCounter = 0;
this.start();
};
return GameView;
}(engine.Container));
......@@ -256,7 +257,6 @@
};
return GameWrapper;
}(engine.Container));
//# sourceMappingURL=GameWrapper.js.map
function index (props) {
prepareProps();
......@@ -264,7 +264,6 @@
var instance = new GameWrapper();
return instance;
}
//# sourceMappingURL=index.js.map
return index;
......
This diff is collapsed.
......@@ -30,6 +30,9 @@ export default class GameView extends engine.Container {
// 图片一维数组
const result = qietu(this.picturesWrapper, props.picUrl, MAX_COL, MAX_ROW);
this.picturesWrapper.addChild(this.guideHole);
console.log(this.picturesWrapper)
this.pictures = result[0];
this.rightList = this.pictures.concat([]);
const posList = result[1];
......@@ -156,8 +159,8 @@ export default class GameView extends engine.Container {
// const btn = new engine.Rect();
// btn.width = 200;
// btn.height = 100;
// // btn.stage.top = 1000;
// // btn.stage.left = 350;
// btn.stage.top = 1000;
// btn.stage.left = 350;
// btn.fillColor = 'cyan';
// this.addChild(btn)
......@@ -303,7 +306,6 @@ export default class GameView extends engine.Container {
// 当前图片的位置
this.dragPic.x = e.stageX - this.localPicX;
this.dragPic.y = e.stageY - this.localPicY;
console.log(this.dragPic.x,this.dragPic.y)
// 当前图片的中心位置
this.centerX = this.dragPic.x + w / 2;
......@@ -311,13 +313,13 @@ export default class GameView extends engine.Container {
}
// onClk(e){
// // 重置时间
// this._timeCounter = 0;
// //重置图片顺序
onClk(e){
// 重置时间
this._timeCounter = 0;
//重置图片顺序
this.start();
// }
}
}
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