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
ac73e807
Commit
ac73e807
authored
Jun 04, 2020
by
汪欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拼图计时器bug
parent
3e4545c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
GameView.ts
src/custom/myPic/GameView.ts
+71
-0
No files found.
src/custom/myPic/GameView.ts
0 → 100644
View file @
ac73e807
const
W
=
600
const
H
=
600
const
MAX_ROW
=
3
;
const
MAX_COL
=
3
;
const
GAP
=
10
;
const
w
=
W
/
MAX_COL
;
const
h
=
H
/
MAX_ROW
;
export
default
class
GameView
extends
engine
.
Container
{
constructor
(){
super
()
}
start
(){
}
setup
(){
}
cutPicture
(
parent
,
url
,
MAX_ROW
,
MAX_COL
){
const
sprite
=
[]
for
(
let
row
=
0
;
row
<
MAX_ROW
;
row
++
)
{
for
(
let
col
=
0
;
col
<
MAX_COL
;
col
++
)
{
// 创建图片子节点
const
child
=
new
engine
.
Sprite
.
fromImage
(
url
);
sprite
.
push
(
child
)
child
.
scaleX
=
}
}
}
}
\ No newline at end of file
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