Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
WL02
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
WL02
Commits
8626539e
Commit
8626539e
authored
Sep 06, 2021
by
linzhiguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ 增加当前题,错误题标识
+ >=0.6 动画
parent
ef209f46
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
337 additions
and
48 deletions
+337
-48
WL02.fire
play/assets/WL02/scene/WL02.fire
+228
-34
WL02.js
play/assets/WL02/scene/WL02.js
+37
-14
icon_correct.png
play/assets/WL02/textures/icon_correct.png
+0
-0
icon_correct.png.meta
play/assets/WL02/textures/icon_correct.png.meta
+36
-0
icon_incorrect.png
play/assets/WL02/textures/icon_incorrect.png
+0
-0
icon_incorrect.png.meta
play/assets/WL02/textures/icon_incorrect.png.meta
+36
-0
No files found.
play/assets/WL02/scene/WL02.fire
View file @
8626539e
...
...
@@ -3931,7 +3931,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
2
4
0,
2
8
0,
322,
0,
0,
...
...
@@ -4576,7 +4576,7 @@
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right":
5
0,
"_right":
1
0,
"_top": 18,
"_bottom": 0,
"_verticalCenter": 0,
...
...
@@ -5034,7 +5034,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d175e9c9-f9de-4dbc-8759-652357567489"
...
...
@@ -5250,7 +5250,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d175e9c9-f9de-4dbc-8759-652357567489"
...
...
@@ -6398,10 +6398,10 @@
"__id__": 133
},
{
"__id__": 1
38
"__id__": 1
42
},
{
"__id__": 15
3
"__id__": 15
7
}
],
"_active": true,
...
...
@@ -6526,12 +6526,18 @@
"_children": [
{
"__id__": 135
},
{
"__id__": 137
},
{
"__id__": 139
}
],
"_active": true,
"_components": [
{
"__id__": 1
37
"__id__": 1
41
}
],
"_prefab": null,
...
...
@@ -6676,6 +6682,194 @@
"_atlas": null,
"_id": "e4OZK2LL5Gi7Um5nQUO1lo"
},
{
"__type__": "cc.Node",
"_name": "icon_incorrect",
"_objFlags": 0,
"_parent": {
"__id__": 134
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 138
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 37,
"height": 51
},
"_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": "495iSCROFCw4/BOesejbYn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "aa4b89fb-61ee-4c70-98a3-c453a3d08ebf"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "dbO6aFE+xCCpWjpYuWBizE"
},
{
"__type__": "cc.Node",
"_name": "icon_correct",
"_objFlags": 0,
"_parent": {
"__id__": 134
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 140
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 37,
"height": 51
},
"_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": "889UjxpxNHUYxLbPr3vVgJ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8ff1d8dd-d6a3-40a0-9af2-32daae1da95e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "11NvX0TWdLq6AZ09C/JdwG"
},
{
"__type__": "cc.Sprite",
"_name": "",
...
...
@@ -6716,12 +6910,6 @@
"__id__": 132
},
"_children": [
{
"__id__": 139
},
{
"__id__": 141
},
{
"__id__": 143
},
...
...
@@ -6736,6 +6924,12 @@
},
{
"__id__": 151
},
{
"__id__": 153
},
{
"__id__": 155
}
],
"_active": true,
...
...
@@ -6793,13 +6987,13 @@
"_name": "correct",
"_objFlags": 0,
"_parent": {
"__id__": 1
38
"__id__": 1
42
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
0
"__id__": 14
4
}
],
"_prefab": null,
...
...
@@ -6855,7 +7049,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
39
"__id__": 1
43
},
"_enabled": true,
"_clip": {
...
...
@@ -6874,13 +7068,13 @@
"_name": "dizzy",
"_objFlags": 0,
"_parent": {
"__id__": 1
38
"__id__": 1
42
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
2
"__id__": 14
6
}
],
"_prefab": null,
...
...
@@ -6936,7 +7130,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
1
"__id__": 14
5
},
"_enabled": true,
"_clip": {
...
...
@@ -6955,13 +7149,13 @@
"_name": "incorrect",
"_objFlags": 0,
"_parent": {
"__id__": 1
38
"__id__": 1
42
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 14
4
"__id__": 14
8
}
],
"_prefab": null,
...
...
@@ -7017,7 +7211,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
3
"__id__": 14
7
},
"_enabled": true,
"_clip": {
...
...
@@ -7036,13 +7230,13 @@
"_name": "time321",
"_objFlags": 0,
"_parent": {
"__id__": 1
38
"__id__": 1
42
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
46
"__id__": 1
50
}
],
"_prefab": null,
...
...
@@ -7098,7 +7292,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
5
"__id__": 14
9
},
"_enabled": true,
"_clip": {
...
...
@@ -7117,13 +7311,13 @@
"_name": "victory",
"_objFlags": 0,
"_parent": {
"__id__": 1
38
"__id__": 1
42
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
48
"__id__": 1
52
}
],
"_prefab": null,
...
...
@@ -7179,7 +7373,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
47
"__id__": 1
51
},
"_enabled": true,
"_clip": {
...
...
@@ -7198,13 +7392,13 @@
"_name": "lose",
"_objFlags": 0,
"_parent": {
"__id__": 1
38
"__id__": 1
42
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
0
"__id__": 15
4
}
],
"_prefab": null,
...
...
@@ -7260,7 +7454,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
49
"__id__": 1
53
},
"_enabled": true,
"_clip": {
...
...
@@ -7279,13 +7473,13 @@
"_name": "fall",
"_objFlags": 0,
"_parent": {
"__id__": 1
38
"__id__": 1
42
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
2
"__id__": 15
6
}
],
"_prefab": null,
...
...
@@ -7341,7 +7535,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
1
"__id__": 15
5
},
"_enabled": true,
"_clip": {
...
...
play/assets/WL02/scene/WL02.js
View file @
8626539e
...
...
@@ -427,7 +427,10 @@ cc.Class({
area
.
addChild
(
item
);
item
.
y
=
0
;
item
.
scale
=
this
.
between
(
0.5
,
(
width
/
len
-
padding_x
)
/
item
.
width
,
1
);
item
.
children
[
0
].
active
=
false
;
item
.
flag
=
item
.
getComponent
(
cc
.
Sprite
);
item
.
flag1
=
item
.
getChildByName
(
'
icon_1
'
);
item
.
correct
=
item
.
getChildByName
(
'
icon_correct
'
);
item
.
incorrect
=
item
.
getChildByName
(
'
icon_incorrect
'
);
}
this
.
_index
=
0
;
},
...
...
@@ -449,6 +452,8 @@ cc.Class({
// info.correct.length = Math.min(info.correct.length, 3);
// info.incorrect.length = Math.min(info.incorrect.length, 3);
this
.
currentOutline
();
this
.
_correct_index
=
0
;
let
idxs
=
[
info
.
correct
,
info
.
incorrect
];
if
(
RandomInt
(
2
)
==
0
){
...
...
@@ -488,20 +493,33 @@ cc.Class({
if
(
this
.
_index
>=
this
.
data
.
length
)
return
;
let
idx
=
this
.
data
.
length
-
this
.
_index
-
1
;
let
area
=
this
.
_area
let
flag
=
area
.
children
[
idx
].
getComponent
(
cc
.
Sprite
);
flag
.
enabled
=
false
;
let
item
=
this
.
currentFlag
();
item
.
flag
.
enabled
=
false
;
let
flag1
=
flag
.
node
.
children
[
0
];
flag1
.
active
=
true
;
cc
.
tween
(
flag1
)
item
.
flag1
.
active
=
true
;
item
.
correct
.
active
=
false
;
item
.
incorrect
.
active
=
false
;
cc
.
tween
(
item
.
flag1
)
.
to
(
0.1
,
{
scale
:
1.2
},{
easing
:
'
quadIn
'
})
.
to
(
0.2
,
{
scale
:
0.8
},{
easing
:
'
quadOut
'
})
.
to
(
0.1
,
{
scale
:
1
},{
easing
:
'
quadIn
'
})
.
start
();
},
currentFlag
(){
let
idx
=
this
.
data
.
length
-
this
.
_index
-
1
;
let
area
=
this
.
_area
;
return
area
.
children
[
idx
];
},
currentOutline
(
correct
=
true
){
let
item
=
this
.
currentFlag
(
this
.
_index
);
item
.
flag
.
enabled
=
true
;
item
.
flag1
.
active
=
false
;
item
.
correct
.
active
=
correct
;
item
.
incorrect
.
active
=
!
correct
;
},
tryFinish
(){
if
(
this
.
_finished
==
true
)
return
;
...
...
@@ -517,7 +535,7 @@ cc.Class({
if
(
this
.
_index
>=
this
.
data
.
length
){
this
.
_finished
=
true
;
if
(
this
.
allWrong
()
==
true
){
if
(
this
.
failure
()
==
true
){
this
.
playAudioByName
(
'
lose
'
);
this
.
_comeon
.
active
=
true
;
playDragonBoneAnimation
(
this
.
_comeon
,
'
newAnimation
'
,
1
,
()
=>
{
...
...
@@ -589,6 +607,7 @@ cc.Class({
this
.
_sound_button
.
_sprite
.
active
=
false
;
this
.
_can_hitted
=
false
;
this
.
cleanTimer
();
this
.
currentOutline
(
false
);
for
(
let
i
=
0
;
i
<
2
;
i
++
){
this
.
flyVirus
[
i
].
active
=
false
;
...
...
@@ -643,6 +662,8 @@ cc.Class({
this
.
_can_hitted
=
false
;
if
(
correct
==
true
)
this
.
updateFlag
();
else
this
.
currentOutline
(
false
);
let
fly
;
for
(
let
i
=
0
;
i
<
2
;
i
++
){
...
...
@@ -652,7 +673,7 @@ cc.Class({
fly
.
_recount_timer
=
null
;
}
if
(
i
==
this
.
_correct_index
){
if
(
correct
==
(
i
==
this
.
_correct_index
)
){
playDragonBoneAnimation
(
fly
,
'
dizzy
'
,
-
1
);
fly
.
_fall_ani
=
cc
.
tween
(
fly
)
.
to
(
1
,
{
y
:
fly
.
_x
-
this
.
_frameSize
.
height
*
1.5
})
...
...
@@ -706,14 +727,16 @@ cc.Class({
.
start
();
},
allWrong
(){
failure
(){
let
item
,
len
=
this
.
_area
.
childrenCount
;
let
count
=
0
;
for
(
let
i
=
0
;
i
<
len
;
i
++
){
item
=
this
.
_area
.
children
[
i
];
if
(
item
.
children
[
0
]
.
active
==
true
)
return
false
;
if
(
item
.
incorrect
.
active
==
true
)
count
++
;
}
return
true
;
console
.
log
(
count
/
len
);
return
count
/
len
>=
0.4
;
},
...
...
play/assets/WL02/textures/icon_correct.png
0 → 100644
View file @
8626539e
1.87 KB
play/assets/WL02/textures/icon_correct.png.meta
0 → 100644
View file @
8626539e
{
"ver": "2.3.5",
"uuid": "936c2fda-6df3-4146-97e8-f6455a329d7b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 37,
"height": 51,
"platformSettings": {},
"subMetas": {
"icon_correct": {
"ver": "1.0.4",
"uuid": "8ff1d8dd-d6a3-40a0-9af2-32daae1da95e",
"rawTextureUuid": "936c2fda-6df3-4146-97e8-f6455a329d7b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 37,
"height": 51,
"rawWidth": 37,
"rawHeight": 51,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
play/assets/WL02/textures/icon_incorrect.png
0 → 100644
View file @
8626539e
2 KB
play/assets/WL02/textures/icon_incorrect.png.meta
0 → 100644
View file @
8626539e
{
"ver": "2.3.5",
"uuid": "db1907bd-a766-4e24-8fdb-98cf2e14a63d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 37,
"height": 51,
"platformSettings": {},
"subMetas": {
"icon_incorrect": {
"ver": "1.0.4",
"uuid": "aa4b89fb-61ee-4c70-98a3-c453a3d08ebf",
"rawTextureUuid": "db1907bd-a766-4e24-8fdb-98cf2e14a63d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 37,
"height": 51,
"rawWidth": 37,
"rawHeight": 51,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ 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