Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-libs
Commits
5303505f
Commit
5303505f
authored
Jun 04, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
eeb207d3
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
.DS_Store
dist/.DS_Store
+0
-0
pictures.json
dist/customs/pictures.json
+1
-1
main.js
src/custom/pictures/debug/main.js
+1
-1
GameView.ts
src/custom/pictures/src/game/GameView.ts
+7
-7
No files found.
dist/.DS_Store
View file @
5303505f
No preview for this file type
dist/customs/pictures.json
View file @
5303505f
This diff is collapsed.
Click to expand it.
src/custom/pictures/debug/main.js
View file @
5303505f
This diff is collapsed.
Click to expand it.
src/custom/pictures/src/game/GameView.ts
View file @
5303505f
...
...
@@ -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)
// 当前图片的中心位置
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment