Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WL01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
WL01
Commits
370cea16
Commit
370cea16
authored
Jul 21, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ come on 动画 | 逻辑
+ 框架代码
parent
dafec3db
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
286 additions
and
53 deletions
+286
-53
lose.mp3
play/assets/WL01/audios/lose.mp3
+0
-0
lose.mp3.meta
play/assets/WL01/audios/lose.mp3.meta
+7
-0
comeon_ske.json
play/assets/WL01/dragonBones/comeon_ske.json
+1
-0
comeon_ske.json.meta
play/assets/WL01/dragonBones/comeon_ske.json.meta
+5
-0
comeon_tex.json
play/assets/WL01/dragonBones/comeon_tex.json
+1
-0
comeon_tex.json.meta
play/assets/WL01/dragonBones/comeon_tex.json.meta
+5
-0
comeon_tex.png
play/assets/WL01/dragonBones/comeon_tex.png
+0
-0
comeon_tex.png.meta
play/assets/WL01/dragonBones/comeon_tex.png.meta
+36
-0
WL01.fire
play/assets/WL01/scene/WL01.fire
+177
-42
WL01.js
play/assets/WL01/scene/WL01.js
+53
-10
defaultData.js
play/assets/WL01/script/defaultData.js
+1
-1
No files found.
play/assets/WL01/audios/lose.mp3
0 → 100644
View file @
370cea16
File added
play/assets/WL01/audios/lose.mp3.meta
0 → 100644
View file @
370cea16
{
"ver": "2.0.1",
"uuid": "fa5062c9-e0d3-4988-8e91-53e6cea9662d",
"downloadMode": 0,
"duration": 3.761633,
"subMetas": {}
}
\ No newline at end of file
play/assets/WL01/dragonBones/comeon_ske.json
0 → 100644
View file @
370cea16
{
"frameRate"
:
24
,
"name"
:
"comeon"
,
"version"
:
"5.5"
,
"compatibleVersion"
:
"5.5"
,
"armature"
:[{
"type"
:
"Armature"
,
"frameRate"
:
24
,
"name"
:
"Armature"
,
"aabb"
:{
"x"
:
-360.46
,
"y"
:
-155.14
,
"width"
:
720
,
"height"
:
199
},
"bone"
:[{
"name"
:
"root"
},{
"name"
:
"WL-comeon"
,
"parent"
:
"root"
,
"transform"
:{
"x"
:
-2.65
,
"y"
:
-22.55
}}],
"slot"
:[{
"name"
:
"WL-comeon"
,
"parent"
:
"WL-comeon"
}],
"skin"
:[{
"slot"
:[{
"name"
:
"WL-comeon"
,
"display"
:[{
"name"
:
"WL-comeon"
,
"transform"
:{
"x"
:
2.19
,
"y"
:
-33.09
}}]}]}],
"animation"
:[{
"duration"
:
34
,
"playTimes"
:
0
,
"name"
:
"newAnimation"
,
"bone"
:[{
"name"
:
"WL-comeon"
,
"translateFrame"
:[{
"duration"
:
12
,
"tweenEasing"
:
0
,
"y"
:
-477.5
},{
"duration"
:
6
,
"tweenEasing"
:
0
,
"y"
:
24.18
},{
"duration"
:
6
,
"tweenEasing"
:
0
,
"y"
:
-2.9
},{
"duration"
:
10
,
"tweenEasing"
:
0
,
"y"
:
24.18
},{
"duration"
:
0
,
"y"
:
567.5
}]}]}],
"defaultActions"
:[{
"gotoAndPlay"
:
"newAnimation"
}],
"canvas"
:{
"width"
:
1280
,
"height"
:
720
}}]}
\ No newline at end of file
play/assets/WL01/dragonBones/comeon_ske.json.meta
0 → 100644
View file @
370cea16
{
"ver": "1.0.1",
"uuid": "23cf49aa-e3b4-4f37-bfc7-53efb370beec",
"subMetas": {}
}
\ No newline at end of file
play/assets/WL01/dragonBones/comeon_tex.json
0 → 100644
View file @
370cea16
{
"width"
:
1024
,
"imagePath"
:
"comeon_tex.png"
,
"height"
:
256
,
"name"
:
"comeon"
,
"SubTexture"
:[{
"width"
:
720
,
"y"
:
1
,
"height"
:
199
,
"name"
:
"WL-comeon"
,
"x"
:
1
}]}
\ No newline at end of file
play/assets/WL01/dragonBones/comeon_tex.json.meta
0 → 100644
View file @
370cea16
{
"ver": "1.0.1",
"uuid": "f4dcfc9d-c0a9-4b98-91b9-e1ac1883c802",
"subMetas": {}
}
\ No newline at end of file
play/assets/WL01/dragonBones/comeon_tex.png
0 → 100644
View file @
370cea16
116 KB
play/assets/WL01/dragonBones/comeon_tex.png.meta
0 → 100644
View file @
370cea16
{
"ver": "2.3.5",
"uuid": "d4a66683-df79-4d97-a386-457122d080b9",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 256,
"platformSettings": {},
"subMetas": {
"comeon_tex": {
"ver": "1.0.4",
"uuid": "84402521-8a6e-4545-b793-bbfdab58a19b",
"rawTextureUuid": "d4a66683-df79-4d97-a386-457122d080b9",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -151,
"offsetY": 27.5,
"trimX": 1,
"trimY": 1,
"width": 720,
"height": 199,
"rawWidth": 1024,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
play/assets/WL01/scene/WL01.fire
View file @
370cea16
...
...
@@ -17,7 +17,7 @@
"__id__": 2
},
{
"__id__": 24
2
"__id__": 24
5
}
],
"_active": false,
...
...
@@ -124,18 +124,21 @@
},
{
"__id__": 236
},
{
"__id__": 239
}
],
"_active": true,
"_components": [
{
"__id__": 2
39
"__id__": 2
42
},
{
"__id__": 24
0
"__id__": 24
3
},
{
"__id__": 24
1
"__id__": 24
4
}
],
"_prefab": null,
...
...
@@ -13015,6 +13018,138 @@
"_originalHeight": 0,
"_id": "46Z6t2RmxGBbBdNwi679dP"
},
{
"__type__": "cc.Node",
"_name": "comeon",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 240
},
{
"__id__": 241
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 720,
"height": 199
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "7cT+5ZNvNGiqkWtr6Ej27a"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 239
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "Armature",
"_animationName": "",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "23cf49aa-e3b4-4f37-bfc7-53efb370beec#f4dcfc9d-c0a9-4b98-91b9-e1ac1883c802",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "23cf49aa-e3b4-4f37-bfc7-53efb370beec"
},
"_N$dragonAtlasAsset": {
"__uuid__": "f4dcfc9d-c0a9-4b98-91b9-e1ac1883c802"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "19F7+WnwVPAqks/aB4EMQk"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 239
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 18,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "7dXRGWhgJH258ElrfYD+8y"
},
{
"__type__": "cc.Canvas",
"_name": "",
...
...
@@ -13107,10 +13242,10 @@
},
"_children": [
{
"__id__": 24
3
"__id__": 24
6
},
{
"__id__": 2
48
"__id__": 2
51
}
],
"_active": true,
...
...
@@ -13168,11 +13303,11 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 24
2
"__id__": 24
5
},
"_children": [
{
"__id__": 24
4
"__id__": 24
7
}
],
"_active": true,
...
...
@@ -13230,17 +13365,17 @@
"_name": "icon_0",
"_objFlags": 0,
"_parent": {
"__id__": 24
3
"__id__": 24
6
},
"_children": [
{
"__id__": 24
5
"__id__": 24
8
}
],
"_active": true,
"_components": [
{
"__id__": 2
47
"__id__": 2
50
}
],
"_prefab": null,
...
...
@@ -13296,13 +13431,13 @@
"_name": "icon_1",
"_objFlags": 0,
"_parent": {
"__id__": 24
4
"__id__": 24
7
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 24
6
"__id__": 24
9
}
],
"_prefab": null,
...
...
@@ -13358,9 +13493,9 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
5
"__id__": 24
8
},
"_enabled":
fals
e,
"_enabled":
tru
e,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
...
...
@@ -13390,7 +13525,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
4
"__id__": 24
7
},
"_enabled": true,
"_materials": [
...
...
@@ -13422,26 +13557,26 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 24
2
"__id__": 24
5
},
"_children": [
{
"__id__": 2
49
"__id__": 2
52
},
{
"__id__": 25
1
"__id__": 25
4
},
{
"__id__": 25
3
"__id__": 25
6
},
{
"__id__": 25
5
"__id__": 25
8
},
{
"__id__": 2
57
"__id__": 2
60
},
{
"__id__": 2
59
"__id__": 2
62
}
],
"_active": true,
...
...
@@ -13499,13 +13634,13 @@
"_name": "correct",
"_objFlags": 0,
"_parent": {
"__id__": 2
48
"__id__": 2
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
0
"__id__": 25
3
}
],
"_prefab": null,
...
...
@@ -13561,7 +13696,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
49
"__id__": 2
52
},
"_enabled": true,
"_clip": {
...
...
@@ -13580,13 +13715,13 @@
"_name": "incorrect",
"_objFlags": 0,
"_parent": {
"__id__": 2
48
"__id__": 2
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
2
"__id__": 25
5
}
],
"_prefab": null,
...
...
@@ -13642,7 +13777,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
1
"__id__": 25
4
},
"_enabled": true,
"_clip": {
...
...
@@ -13661,13 +13796,13 @@
"_name": "time321",
"_objFlags": 0,
"_parent": {
"__id__": 2
48
"__id__": 2
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
4
"__id__": 25
7
}
],
"_prefab": null,
...
...
@@ -13723,7 +13858,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
3
"__id__": 25
6
},
"_enabled": true,
"_clip": {
...
...
@@ -13742,13 +13877,13 @@
"_name": "victory",
"_objFlags": 0,
"_parent": {
"__id__": 2
48
"__id__": 2
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
6
"__id__": 25
9
}
],
"_prefab": null,
...
...
@@ -13804,7 +13939,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
5
"__id__": 25
8
},
"_enabled": true,
"_clip": {
...
...
@@ -13823,13 +13958,13 @@
"_name": "dizzy",
"_objFlags": 0,
"_parent": {
"__id__": 2
48
"__id__": 2
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
58
"__id__": 2
61
}
],
"_prefab": null,
...
...
@@ -13885,7 +14020,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
57
"__id__": 2
60
},
"_enabled": true,
"_clip": {
...
...
@@ -13904,13 +14039,13 @@
"_name": "laugh",
"_objFlags": 0,
"_parent": {
"__id__": 2
48
"__id__": 2
51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 26
0
"__id__": 26
3
}
],
"_prefab": null,
...
...
@@ -13966,7 +14101,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
59
"__id__": 2
62
},
"_enabled": true,
"_clip": {
...
...
play/assets/WL01/scene/WL01.js
View file @
370cea16
...
...
@@ -85,6 +85,8 @@ cc.Class({
this
.
adjustMousePosition
();
this
.
_flower
=
cc
.
find
(
'
Canvas/flower
'
);
this
.
_flower
.
active
=
false
;
this
.
_comeon
=
cc
.
find
(
'
Canvas/comeon
'
);
this
.
_comeon
.
active
=
false
;
},
...
...
@@ -177,13 +179,33 @@ cc.Class({
this
.
title
.
string
=
this
.
data
.
title
;
let
audio_url
=
this
.
data
.
audio_url
;
if
(
audio_url
&&
audio_url
!=
""
){
playAudioByUrl
(
audio_url
,
()
=>
{
this
.
playGame
();
});
if
(
window
&&
window
.
courseware
)
{
window
.
courseware
.
onEvent
(
"
course-in-screen
"
,
(
data
,
next
)
=>
{
// 这里才能执行初始化就开始的东西
if
(
audio_url
&&
audio_url
!=
""
){
playAudioByUrl
(
audio_url
,
()
=>
{
this
.
playGame
();
});
}
else
{
this
.
playGame
();
}
next
();
})
return
;
}
else
{
this
.
playGame
();
if
(
audio_url
&&
audio_url
!=
""
){
playAudioByUrl
(
audio_url
,
()
=>
{
this
.
playGame
();
});
}
else
{
this
.
playGame
();
}
}
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
(
event
)
=>
{
...
...
@@ -361,7 +383,7 @@ cc.Class({
flag
.
enabled
=
false
;
let
flag1
=
flag
.
node
.
children
[
0
];
flag1
.
getComponent
(
cc
.
Sprite
).
enabled
=
true
;
flag1
.
active
=
true
;
cc
.
tween
(
flag1
)
.
to
(
0.1
,
{
scale
:
1.2
},{
easing
:
'
quadIn
'
})
.
to
(
0.2
,
{
scale
:
0.8
},{
easing
:
'
quadOut
'
})
...
...
@@ -370,6 +392,9 @@ cc.Class({
},
tryFinished
(){
if
(
this
.
_finished
==
true
)
return
;
if
(
this
.
_laugh
){
this
.
_laugh
.
stop
();
this
.
_laugh
=
null
;
...
...
@@ -377,10 +402,18 @@ cc.Class({
this
.
_flag_index
++
;
if
(
this
.
_flag_index
>=
this
.
data
.
mouses
.
length
){
//console.log("over");
this
.
playAudioByName
(
'
victory
'
);
this
.
_flower
.
active
=
true
;
playDragonBoneAnimation
(
this
.
_flower
,
'
normal
'
);
this
.
_finished
=
true
;
if
(
this
.
allWrong
()
==
true
){
this
.
playAudioByName
(
'
lose
'
);
this
.
_comeon
.
active
=
true
;
playDragonBoneAnimation
(
this
.
_comeon
,
'
newAnimation
'
);
}
else
{
this
.
playAudioByName
(
'
victory
'
);
this
.
_flower
.
active
=
true
;
playDragonBoneAnimation
(
this
.
_flower
,
'
normal
'
);
}
return
;
}
...
...
@@ -418,6 +451,16 @@ cc.Class({
this
.
timer1
.
string
=
str
;
},
allWrong
(){
let
area
=
cc
.
find
(
'
Canvas/flag_area
'
);
let
len
=
area
.
childrenCount
;
for
(
let
i
=
0
;
i
<
len
;
i
++
){
if
(
area
.
children
[
i
].
children
[
0
].
active
==
true
)
return
false
;
}
return
true
;
},
// update (dt) {},
Between
(
a
,
b
,
c
)
{
return
[
a
,
b
,
c
].
sort
()[
1
];
...
...
play/assets/WL01/script/defaultData.js
View file @
370cea16
...
...
@@ -25,6 +25,6 @@ export const defaultData =
}
],
"
title
"
:
"
weioewowe
"
,
"
time
"
:
"
10
"
,
"
time
"
:
"
3
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/738ef124b1882d10b31d59fb2fbd7eb7.mp3
"
}
\ 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