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
15f1811a
Commit
15f1811a
authored
Jun 03, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
53727adb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
58 deletions
+33
-58
pictures.json
dist/customs/pictures.json
+10
-24
app.js
src/custom/pictures/debug/app.js
+1
-1
main.js
src/custom/pictures/debug/main.js
+4
-3
main.js.map
src/custom/pictures/debug/main.js.map
+1
-1
meta.json
src/custom/pictures/meta.json
+10
-23
qietu.ts
src/custom/pictures/src/game/qietu.ts
+7
-6
No files found.
dist/customs/pictures.json
View file @
15f1811a
This diff is collapsed.
Click to expand it.
src/custom/pictures/debug/app.js
View file @
15f1811a
...
...
@@ -47,7 +47,7 @@ function launchWithCustomModule(customModule) {
setTimeout
(()
=>
{
engine
.
globalEvent
.
dispatchEvent
(
'pictures-start'
,
{
picUrl
:
"http://yun.duiba.com.cn/aurora/assets/
fb06e66c26f17b00f677367bd7571a1aa9b1ade4
.png"
picUrl
:
"http://yun.duiba.com.cn/aurora/assets/
e1593b97c27077b85b92f7eaaeae1ed64a1eb79a
.png"
});
},
500
);
...
...
src/custom/pictures/debug/main.js
View file @
15f1811a
...
...
@@ -15,9 +15,9 @@
//# sourceMappingURL=props.js.map
var
qietu
=
(
function
(
parent
,
url
,
MAX_COL
,
MAX_ROW
)
{
var
W
=
600
;
var
H
=
600
;
var
GAP
=
10
;
var
W
=
props
.
W
;
var
H
=
props
.
H
;
var
GAP
=
props
.
GAP
;
var
spr
=
[];
var
pos
=
[];
var
_loop_1
=
function
(
row
)
{
...
...
@@ -200,6 +200,7 @@
};
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 @
15f1811a
This diff is collapsed.
Click to expand it.
src/custom/pictures/meta.json
View file @
15f1811a
...
...
@@ -5,22 +5,22 @@
"MAX_COL"
:
{
"alias"
:
"图片分成几列"
,
"type"
:
"number"
,
"default"
:
2
"default"
:
4
},
"MAX_ROW"
:
{
"alias"
:
"图片分成几行"
,
"type"
:
"number"
,
"default"
:
2
"default"
:
4
},
"W"
:
{
"alias"
:
"图片的宽度"
,
"type"
:
"number"
,
"default"
:
6
00
"default"
:
6
18
},
"H"
:
{
"alias"
:
"图片的高度"
,
"type"
:
"number"
,
"default"
:
600
"default"
:
827
},
"GAP"
:
{
"alias"
:
"图片间隙"
,
...
...
@@ -44,28 +44,15 @@
],
"events"
:
{
"in"
:
{
"pictures-reset"
:
{
"alias"
:
"重置"
,
"pictures-start"
:
{
"alias"
:
"开始"
,
"data"
:
{
"goodsProbability"
:
"[0.2,0.5,0.3]道具概率(雨滴、石头、炸弹),所有概率相加为1"
,
"countDown"
:
"倒计时(s)"
,
"acceleratedSpeed"
:
"道具掉落加速度(单位:每秒)"
"picUrl"
:
"图片路径"
}
},
"pictures-start"
:
{
"alias"
:
"开始"
},
"pictures-revive"
:
{
"alias"
:
"复活"
},
"pictures-pause"
:
{
"alias"
:
"暂停"
},
"pictures-resume"
:
{
"alias"
:
"恢复"
},
"pictures-clear"
:
{
"alias"
:
"清空,通过reset事件恢复"
"pictures-stop"
:
{
"alias"
:
"停止"
}
},
"out"
:
{
...
...
src/custom/pictures/src/game/qietu.ts
View file @
15f1811a
export
default
(
parent
,
url
,
MAX_COL
,
MAX_ROW
)
=>
{
import
{
props
}
from
"../props"
;
export
default
(
parent
,
url
,
MAX_COL
,
MAX_ROW
)
=>
{
const
W
=
600
;
const
H
=
600
;
const
GAP
=
10
;
const
W
=
props
.
W
;
const
H
=
props
.
H
;
const
GAP
=
props
.
GAP
;
const
spr
=
[];
const
pos
=
[]
...
...
@@ -18,7 +19,7 @@ export default (parent, url,MAX_COL,MAX_ROW) => {
parent
.
addChild
(
child
);
child
.
x
=
col
*
(
W
/
MAX_COL
+
GAP
);
child
.
y
=
row
*
(
H
/
MAX_ROW
+
GAP
);
pos
.
push
([
child
.
x
,
child
.
y
]);
pos
.
push
([
child
.
x
,
child
.
y
]);
child
.
addEventListener
(
engine
.
Event
.
COMPLETE
,
()
=>
{
const
uvs
=
new
Float32Array
([
col
/
MAX_COL
,
...
...
@@ -37,5 +38,5 @@ export default (parent, url,MAX_COL,MAX_ROW) => {
}
}
// console.log(spr);
return
[
spr
,
pos
];
return
[
spr
,
pos
];
};
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