Commit 5303505f authored by wildfirecode's avatar wildfirecode

1

parent eeb207d3
No preview for this file type
This diff is collapsed.
This diff is collapsed.
......@@ -7,8 +7,8 @@ import qietu from "./qietu";
import { getIndexFromRC, getRandomArray, getTextureByName } from "./utils";
import ObjectPool = engine.ObjectPool;
let OFFSET_X;
let OFFSET_Y;
// let OFFSET_X;
// let OFFSET_Y;
let MAX_COL;
let MAX_ROW;
let W;
......@@ -146,8 +146,8 @@ export default class GameView extends engine.Container {
MAX_COL = props.MAX_COL;
MAX_ROW = props.MAX_ROW;
GAME_TIME = props.GAME_TIME;
OFFSET_X = props.OFFSET_X;
OFFSET_Y = props.OFFSET_Y;
// OFFSET_X = props.OFFSET_X;
// OFFSET_Y = props.OFFSET_Y;
W = props.W;
H = props.H;
GAP = props.GAP;
......@@ -314,9 +314,9 @@ export default class GameView extends engine.Container {
onMove(e: engine.MouseEvent) {
// 当前图片的位置
this.dragPic.x = e.stageX - this.localPicX - OFFSET_X;
this.dragPic.y = e.stageY - this.localPicY - (1624 - this.stage.height) / 2 - (1624-OFFSET_Y)/2;
console.log('fuck on move',OFFSET_Y)
this.dragPic.x = e.stageX - this.localPicX - (750-props.W)/2;
this.dragPic.y = e.stageY - this.localPicY - (this.stage.height - props.H) / 2;
console.log('fuck on this.stage.height', this.stage.height)
// console.log(this.dragPic.x, this.dragPic.y)
// 当前图片的中心位置
......
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