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
35f79513
Commit
35f79513
authored
Aug 11, 2020
by
汪欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aaa
parent
2dfa4ce5
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
18 deletions
+33
-18
app.js
src/custom/pictures/debug/app.js
+10
-4
main.js
src/custom/pictures/debug/main.js
+4
-0
main.js.map
src/custom/pictures/debug/main.js.map
+1
-1
meta.json
src/custom/pictures/meta.json
+14
-13
GameView.ts
src/custom/pictures/src/game/GameView.ts
+4
-0
No files found.
src/custom/pictures/debug/app.js
View file @
35f79513
...
...
@@ -17,7 +17,10 @@ function launchWithCustomModule(customModule) {
//engine.registerCustomCodeModule(customModule);
engine
.
registerCustomModule
(
customId
,
window
[
customId
]);
const
{
props
:
propsOption
,
assets
}
=
customModule
;
const
{
props
:
propsOption
,
assets
}
=
customModule
;
let
props
=
engine
.
computeProps
(
customModuleProps
,
propsOption
);
const
customModuleIns
=
{
id
:
customId
,
...
...
@@ -49,11 +52,14 @@ function launchWithCustomModule(customModule) {
engine
.
globalEvent
.
dispatchEvent
(
'pictures-start'
,
{
picUrl
:
"http://yun.duiba.com.cn/aurora/assets/e1593b97c27077b85b92f7eaaeae1ed64a1eb79a.png"
,
blockUrl
:
"888"
,
row
:
3
,
column
:
3
,
gameTime
:
50
});
const
d
=
engine
.
gameStage
.
sceneContainer
.
getChildAt
(
0
);
engine
.
gameStage
.
sceneContainer
.
getChildAt
(
0
).
x
=
(
d
.
stage
.
width
-
props
.
W
)
/
2
;
engine
.
gameStage
.
sceneContainer
.
getChildAt
(
0
).
y
=
(
d
.
stage
.
height
-
props
.
H
)
/
2
;
engine
.
gameStage
.
sceneContainer
.
getChildAt
(
0
).
x
=
(
d
.
stage
.
width
-
props
.
W
)
/
2
;
engine
.
gameStage
.
sceneContainer
.
getChildAt
(
0
).
y
=
(
d
.
stage
.
height
-
props
.
H
)
/
2
;
},
1000
);
// setTimeout(() => {
...
...
@@ -82,4 +88,4 @@ function getAssetByUUID(uuid) {
function
getProps
()
{
return
engine
.
getProps
(
customId
);
}
}
\ No newline at end of file
src/custom/pictures/debug/main.js
View file @
35f79513
...
...
@@ -95,6 +95,10 @@
}
GameView
.
prototype
.
start
=
function
()
{
var
_this
=
this
;
MAX_COL
=
props
.
column
||
props
.
MAX_COL
;
MAX_ROW
=
props
.
row
||
props
.
MAX_ROW
;
GAME_TIME
=
props
.
gameTime
||
props
.
GAME_TIME
;
console
.
log
(
'start'
,
props
.
column
,
props
.
row
,
props
.
gameTime
);
if
(
!
this
.
guideHole
)
{
this
.
guideHole
=
new
engine
.
Image
();
this
.
guideHole
.
source
=
'asset://'
+
props
.
blockUrl
;
...
...
src/custom/pictures/debug/main.js.map
View file @
35f79513
This diff is collapsed.
Click to expand it.
src/custom/pictures/meta.json
View file @
35f79513
...
...
@@ -42,24 +42,25 @@
"type"
:
"number"
,
"default"
:
100
}
},
"assets"
:
[
{
"name"
:
"遮罩"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/5b3e30496b2d9fdafb0cf3835fd6704ce10e45b4.png"
,
"uuid"
:
"888"
,
"ext"
:
".png"
}
],
"assets"
:
[{
"name"
:
"遮罩"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/5b3e30496b2d9fdafb0cf3835fd6704ce10e45b4.png"
,
"uuid"
:
"888"
,
"ext"
:
".png"
}],
"events"
:
{
"in"
:
{
"pictures-start"
:
{
"alias"
:
"开始"
,
"data"
:
{
"picUrl"
:
"图片路径"
,
"blockUrl"
:
"blockUrl"
"picUrl"
:
"图片路径"
,
"blockUrl"
:
"blockUrl"
,
"row"
:
"行"
,
"column"
:
"列"
,
"gameTime"
:
"游戏时间"
}
},
"pictures-stop"
:
{
...
...
@@ -70,7 +71,7 @@
"pictures-time-update"
:
{
"alias"
:
"倒计时更新"
,
"data"
:
{
"time"
:
"剩余时间"
"time"
:
"剩余时间"
}
},
"pictures-game-fail"
:
{
...
...
src/custom/pictures/src/game/GameView.ts
View file @
35f79513
...
...
@@ -27,6 +27,10 @@ export default class GameView extends engine.Container {
private
date
start
()
{
MAX_COL
=
props
.
column
||
props
.
MAX_COL
;
MAX_ROW
=
props
.
row
||
props
.
MAX_ROW
;
GAME_TIME
=
props
.
gameTime
||
props
.
GAME_TIME
;
console
.
log
(
'start'
,
props
.
column
,
props
.
row
,
props
.
gameTime
)
if
(
!
this
.
guideHole
)
{
this
.
guideHole
=
new
engine
.
Image
();
...
...
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