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
7e6d244d
Commit
7e6d244d
authored
Jun 04, 2020
by
汪欢
Browse files
Options
Browse Files
Download
Plain Diff
拼图计时器0.2
parents
851853ad
c36439dd
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
15 deletions
+20
-15
.DS_Store
.DS_Store
+0
-0
.DS_Store
dist/.DS_Store
+0
-0
pictures.json
dist/customs/pictures.json
+3
-3
app.js
src/custom/pictures/debug/app.js
+1
-1
load-assets.js
src/custom/pictures/debug/load-assets.js
+1
-1
main.js
src/custom/pictures/debug/main.js
+2
-2
main.js.map
src/custom/pictures/debug/main.js.map
+1
-1
meta.json
src/custom/pictures/meta.json
+2
-2
GameView.ts
src/custom/pictures/src/game/GameView.ts
+10
-5
No files found.
.DS_Store
View file @
7e6d244d
No preview for this file type
dist/.DS_Store
View file @
7e6d244d
No preview for this file type
dist/customs/pictures.json
View file @
7e6d244d
This diff is collapsed.
Click to expand it.
src/custom/pictures/debug/app.js
View file @
7e6d244d
...
...
@@ -61,7 +61,7 @@ function launchWithCustomModule(customModule) {
// picUrl: "http://yun.duiba.com.cn/aurora/assets/d23e73d37ec01931e48cbd0a4095367044c5675c.png"
});
},
2
000
);
},
10
*
1
000
);
});
engine
.
globalEvent
.
addEventListener
(
'pictures-time-update'
,
(
e
)
=>
{
// console.log(e.type, e.data);
...
...
src/custom/pictures/debug/load-assets.js
View file @
7e6d244d
...
...
@@ -5,7 +5,7 @@
const
assets
=
[
{
"name"
:
"玩家icon"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/5
0a7212a113175fa18c866b005d98f07c558dc77
.png"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/5
b3e30496b2d9fdafb0cf3835fd6704ce10e45b4
.png"
,
"uuid"
:
"66f23d13-82a5-4cec-9496-301ec240d087"
,
"ext"
:
".png"
},
...
...
src/custom/pictures/debug/main.js
View file @
7e6d244d
...
...
@@ -98,6 +98,7 @@
function
GameView
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
_timeCounter
=
0
;
_this
.
listenStageOn
=
1
;
_this
.
once
(
engine
.
Event
.
ADDED_TO_STAGE
,
_this
.
setup
,
_this
);
return
_this
;
}
...
...
@@ -202,6 +203,7 @@
};
GameView
.
prototype
.
stageOnUp
=
function
(
e
)
{
this
.
stage
.
removeEventListener
(
engine
.
MouseEvent
.
MOUSE_MOVE
,
this
.
onMove
,
this
);
this
.
stage
.
removeEventListener
(
engine
.
MouseEvent
.
MOUSE_UP
,
this
.
stageOnUp
,
this
);
if
(
this
.
centerY
<
0
||
this
.
centerX
<
0
)
{
this
.
dragPic
.
x
=
this
.
distanceX
;
this
.
dragPic
.
y
=
this
.
distanceY
;
...
...
@@ -241,7 +243,6 @@
this
.
dragPic
.
x
=
this
.
distanceX
;
this
.
dragPic
.
y
=
this
.
distanceY
;
}
this
.
stage
.
removeEventListener
(
engine
.
MouseEvent
.
MOUSE_UP
,
this
.
stageOnUp
,
this
);
};
GameView
.
prototype
.
onSuccess
=
function
()
{
console
.
log
(
'拼图成功!'
);
...
...
@@ -257,7 +258,6 @@
};
return
GameView
;
}(
engine
.
Container
));
//# sourceMappingURL=GameView.js.map
var
GameWrapper
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameWrapper
,
_super
);
...
...
src/custom/pictures/debug/main.js.map
View file @
7e6d244d
This diff is collapsed.
Click to expand it.
src/custom/pictures/meta.json
View file @
7e6d244d
...
...
@@ -5,12 +5,12 @@
"MAX_COL"
:
{
"alias"
:
"图片分成几列"
,
"type"
:
"number"
,
"default"
:
2
"default"
:
3
},
"MAX_ROW"
:
{
"alias"
:
"图片分成几行"
,
"type"
:
"number"
,
"default"
:
2
"default"
:
4
},
"W"
:
{
"alias"
:
"图片的宽度"
,
...
...
src/custom/pictures/src/game/GameView.ts
View file @
7e6d244d
...
...
@@ -237,13 +237,22 @@ export default class GameView extends engine.Container {
}
listenStageOn
=
1
;
stageOnUp
(
e
)
{
this
.
stage
.
removeEventListener
(
engine
.
MouseEvent
.
MOUSE_MOVE
,
this
.
onMove
,
this
);
this
.
stage
.
removeEventListener
(
engine
.
MouseEvent
.
MOUSE_UP
,
this
.
stageOnUp
,
this
);
// 拖动的图片的中心位置在图片之外,回到原来的位置
if
(
this
.
centerY
<
0
||
this
.
centerX
<
0
)
{
this
.
dragPic
.
x
=
this
.
distanceX
...
...
@@ -309,11 +318,7 @@ export default class GameView extends engine.Container {
this
.
dragPic
.
y
=
this
.
distanceY
}
this
.
stage
.
removeEventListener
(
engine
.
MouseEvent
.
MOUSE_UP
,
this
.
stageOnUp
,
this
);
}
private
onSuccess
()
{
...
...
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