Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbox_FT_11
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
Sbox_FT_11
Commits
dda96c61
Commit
dda96c61
authored
Dec 14, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
effdea78
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
152 deletions
+43
-152
ItemQuestion.prefab
play/assets/tmpGame/prefabs/ItemQuestion.prefab
+32
-147
ItemAnswer.js
play/assets/tmpGame/script/ItemAnswer.js
+3
-0
ItemQuestion.js
play/assets/tmpGame/script/ItemQuestion.js
+3
-2
Scene.js
play/assets/tmpGame/script/Scene.js
+5
-3
No files found.
play/assets/tmpGame/prefabs/ItemQuestion.prefab
View file @
dda96c61
...
@@ -30,23 +30,20 @@
...
@@ -30,23 +30,20 @@
"__id__": 11
"__id__": 11
},
},
{
{
"__id__": 14
"__id__": 19
},
{
"__id__": 22
},
},
{
{
"__id__":
30
"__id__":
27
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 3
3
"__id__": 3
0
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 3
4
"__id__": 3
1
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -420,115 +417,6 @@
...
@@ -420,115 +417,6 @@
"fileId": "7e7QXH+hRGSYXPuwKnxQIb",
"fileId": "7e7QXH+hRGSYXPuwKnxQIb",
"sync": false
"sync": false
},
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": {
"__id__": 13
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-17.629,
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": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "f9d2b752-95ca-42ec-933f-4440d94f83d3"
},
"fileId": "ffC1AHutlCY58pBBffzzg1",
"sync": false
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "qipao1",
"_name": "qipao1",
...
@@ -538,16 +426,16 @@
...
@@ -538,16 +426,16 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
5
"__id__": 1
2
},
},
{
{
"__id__": 1
8
"__id__": 1
5
}
}
],
],
"_active": false,
"_active": false,
"_components": [],
"_components": [],
"_prefab": {
"_prefab": {
"__id__":
21
"__id__":
18
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -601,17 +489,17 @@
...
@@ -601,17 +489,17 @@
"_name": "bg_qipao1",
"_name": "bg_qipao1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
4
"__id__": 1
1
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
6
"__id__": 1
3
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 1
7
"__id__": 1
4
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -665,7 +553,7 @@
...
@@ -665,7 +553,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
5
"__id__": 1
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -708,17 +596,17 @@
...
@@ -708,17 +596,17 @@
"_name": "labQuestion1",
"_name": "labQuestion1",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
4
"__id__": 1
1
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
9
"__id__": 1
6
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
20
"__id__":
17
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -772,7 +660,7 @@
...
@@ -772,7 +660,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
8
"__id__": 1
5
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -834,16 +722,16 @@
...
@@ -834,16 +722,16 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 2
3
"__id__": 2
0
},
},
{
{
"__id__": 2
6
"__id__": 2
3
}
}
],
],
"_active": false,
"_active": false,
"_components": [],
"_components": [],
"_prefab": {
"_prefab": {
"__id__": 2
9
"__id__": 2
6
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -897,17 +785,17 @@
...
@@ -897,17 +785,17 @@
"_name": "bg_qipao2",
"_name": "bg_qipao2",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
22
"__id__":
19
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
4
"__id__": 2
1
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 2
5
"__id__": 2
2
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -961,7 +849,7 @@
...
@@ -961,7 +849,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
3
"__id__": 2
0
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1004,17 +892,17 @@
...
@@ -1004,17 +892,17 @@
"_name": "labQuestion2",
"_name": "labQuestion2",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
22
"__id__":
19
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
7
"__id__": 2
4
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 2
8
"__id__": 2
5
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1068,7 +956,7 @@
...
@@ -1068,7 +956,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
6
"__id__": 2
3
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1132,11 +1020,11 @@
...
@@ -1132,11 +1020,11 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__":
31
"__id__":
28
}
}
],
],
"_prefab": {
"_prefab": {
"__id__":
32
"__id__":
29
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1190,7 +1078,7 @@
...
@@ -1190,7 +1078,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
30
"__id__":
27
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1249,17 +1137,14 @@
...
@@ -1249,17 +1137,14 @@
"dragonBone": {
"dragonBone": {
"__id__": 9
"__id__": 9
},
},
"labText": {
"__id__": 12
},
"labQuestion1": {
"labQuestion1": {
"__id__": 1
9
"__id__": 1
6
},
},
"labQuestion2": {
"labQuestion2": {
"__id__": 2
7
"__id__": 2
4
},
},
"labQuestion3": {
"labQuestion3": {
"__id__":
31
"__id__":
28
},
},
"_id": ""
"_id": ""
},
},
...
...
play/assets/tmpGame/script/ItemAnswer.js
View file @
dda96c61
...
@@ -24,6 +24,9 @@ cc.Class({
...
@@ -24,6 +24,9 @@ cc.Class({
this
.
node
.
off
(
'
touchstart
'
,
this
.
onTouchStart
,
this
);
this
.
node
.
off
(
'
touchstart
'
,
this
.
onTouchStart
,
this
);
},
},
onTouchStart
()
{
onTouchStart
()
{
if
(
GameData
.
isMoving
)
{
return
;
}
if
(
GameData
.
isAudio
)
{
if
(
GameData
.
isAudio
)
{
return
;
return
;
}
}
...
...
play/assets/tmpGame/script/ItemQuestion.js
View file @
dda96c61
...
@@ -5,7 +5,6 @@ cc.Class({
...
@@ -5,7 +5,6 @@ cc.Class({
nodBg1
:
cc
.
Node
,
nodBg1
:
cc
.
Node
,
nodBg2
:
cc
.
Node
,
nodBg2
:
cc
.
Node
,
dragonBone
:
dragonBones
.
ArmatureDisplay
,
dragonBone
:
dragonBones
.
ArmatureDisplay
,
labText
:
cc
.
Label
,
labQuestion1
:
cc
.
Label
,
labQuestion1
:
cc
.
Label
,
labQuestion2
:
cc
.
Label
,
labQuestion2
:
cc
.
Label
,
labQuestion3
:
cc
.
Label
,
labQuestion3
:
cc
.
Label
,
...
@@ -27,7 +26,6 @@ cc.Class({
...
@@ -27,7 +26,6 @@ cc.Class({
this
.
scene
=
scene
;
this
.
scene
=
scene
;
this
.
data
=
data
;
this
.
data
=
data
;
this
.
index
=
index
;
this
.
index
=
index
;
this
.
labText
.
string
=
index
;
this
.
updateLabels
();
this
.
updateLabels
();
this
.
loadDragonBone
();
this
.
loadDragonBone
();
},
},
...
@@ -138,6 +136,9 @@ cc.Class({
...
@@ -138,6 +136,9 @@ cc.Class({
},
},
onTouchStart
()
{
onTouchStart
()
{
if
(
GameData
.
isMoving
)
{
return
;
}
if
(
this
.
isRight
)
{
if
(
this
.
isRight
)
{
return
;
return
;
}
}
...
...
play/assets/tmpGame/script/Scene.js
View file @
dda96c61
...
@@ -206,7 +206,7 @@ cc.Class({
...
@@ -206,7 +206,7 @@ cc.Class({
let
id
=
cc
.
audioEngine
.
play
(
clip
,
false
,
1
);
let
id
=
cc
.
audioEngine
.
play
(
clip
,
false
,
1
);
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
GameData
.
isAudio
=
false
;
GameData
.
isAudio
=
false
;
if
(
!
isBtn
)
{
if
(
!
isBtn
)
{
this
.
showRandomQuestion
();
this
.
showRandomQuestion
();
}
}
})
})
...
@@ -265,6 +265,7 @@ cc.Class({
...
@@ -265,6 +265,7 @@ cc.Class({
},
},
moveToQuestion
(
ItemAnswer
)
{
moveToQuestion
(
ItemAnswer
)
{
GameData
.
isMoving
=
true
;
let
index
=
ItemAnswer
.
index
;
let
index
=
ItemAnswer
.
index
;
let
question
=
this
.
nodeDict
.
nodQuestionParent
.
children
[
index
];
let
question
=
this
.
nodeDict
.
nodQuestionParent
.
children
[
index
];
let
pos
=
this
.
nodeDict
.
nodQuestionParent
.
convertToWorldSpaceAR
(
question
.
position
);
let
pos
=
this
.
nodeDict
.
nodQuestionParent
.
convertToWorldSpaceAR
(
question
.
position
);
...
@@ -282,6 +283,7 @@ cc.Class({
...
@@ -282,6 +283,7 @@ cc.Class({
.
call
(()
=>
{
.
call
(()
=>
{
question
.
getComponent
(
'
ItemQuestion
'
).
stopRightAnimation
();
question
.
getComponent
(
'
ItemQuestion
'
).
stopRightAnimation
();
this
.
getComponent
(
cc
.
Animation
).
play
(
'
animDark
'
);
this
.
getComponent
(
cc
.
Animation
).
play
(
'
animDark
'
);
GameData
.
isMoving
=
false
;
})
})
.
start
()
.
start
()
})
})
...
@@ -291,12 +293,12 @@ cc.Class({
...
@@ -291,12 +293,12 @@ cc.Class({
updateBtnStatus
()
{
updateBtnStatus
()
{
if
(
GameData
.
questionIndex
==
0
)
{
if
(
GameData
.
questionIndex
==
0
)
{
this
.
nodeDict
.
btnLast
.
getComponent
(
cc
.
Button
).
interactable
=
false
;
this
.
nodeDict
.
btnLast
.
getComponent
(
cc
.
Button
).
interactable
=
false
;
}
else
{
}
else
{
this
.
nodeDict
.
btnLast
.
getComponent
(
cc
.
Button
).
interactable
=
true
;
this
.
nodeDict
.
btnLast
.
getComponent
(
cc
.
Button
).
interactable
=
true
;
}
}
if
(
GameData
.
questionIndex
==
this
.
data
.
questionList
.
length
-
1
)
{
if
(
GameData
.
questionIndex
==
this
.
data
.
questionList
.
length
-
1
)
{
this
.
nodeDict
.
btnNext
.
getComponent
(
cc
.
Button
).
interactable
=
false
;
this
.
nodeDict
.
btnNext
.
getComponent
(
cc
.
Button
).
interactable
=
false
;
}
else
{
}
else
{
this
.
nodeDict
.
btnNext
.
getComponent
(
cc
.
Button
).
interactable
=
true
;
this
.
nodeDict
.
btnNext
.
getComponent
(
cc
.
Button
).
interactable
=
true
;
}
}
},
},
...
...
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