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
04f9197a
Commit
04f9197a
authored
Dec 15, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
54470875
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
170 deletions
+64
-170
form.component.html
form/src/app/form/form.component.html
+51
-40
ItemAnswer.prefab
play/assets/tmpGame/prefabs/ItemAnswer.prefab
+6
-121
Scene.fire
play/assets/tmpGame/scene/Scene.fire
+3
-3
ItemAnswer.js
play/assets/tmpGame/script/ItemAnswer.js
+3
-5
Scene.js
play/assets/tmpGame/script/Scene.js
+1
-1
No files found.
form/src/app/form/form.component.html
View file @
04f9197a
...
...
@@ -13,51 +13,62 @@
(
blur
)="
save
()"
>
<br>
<br>
<span
style=
"height: 30px; font-size: 18px;"
>
问题{{i + 1}}选项:
</span>
<div
*
ngFor=
"let option of question.optionList; let j = index"
>
<div
style=
"margin-top: 20px; float: left; border-width: 1px; border-style: dotted;
padding: 20px; margin-right: 20px; width: 230px;"
>
<span
style=
"height: 30px; font-size: 18px;"
>
题干音频:
</span>
<app-audio-recorder
[
audioUrl
]="
option
.
optionAudio
"
(
audioUploaded
)="
onOptionUploadSuccess
($
event
,
i
,
j
)"
>
</app-audio-recorder>
<br>
<span
style=
"height: 30px; font-size: 18px;"
>
题干文本:
</span>
<input
style=
"width: 150px; "
type=
"text"
maxlength=
""
nz-input
[(
ngModel
)]="
option
.
text
"
(
blur
)="
save
()"
>
<br>
<span
style=
"height: 30px; font-size: 18px;"
>
题干骨骼动画:
</span>
<app-upload-dragon-bone
[
btnName
]="[['配置骨骼动画']]"
[
animaNames
]="[[['
normal
']]]"
[
skeJsonData
]=
option
.
optionDragonBone
.
skeJsonData
[
texJsonData
]=
option
.
optionDragonBone
.
texJsonData
[
texPngData
]=
option
.
optionDragonBone
.
texPngData
(
save
)="
saveAnima
($
event
,
option
.
optionDragonBone
)"
(
refreshEmitter
)="
refresh
()"
>
</app-upload-dragon-bone>
<br>
<span
style=
"height: 30px; font-size: 18px;"
>
选项骨骼动画:
</span>
<app-upload-dragon-bone
[
btnName
]="[['配置骨骼动画']]"
[
animaNames
]="[[['
normal
']]]"
[
skeJsonData
]=
option
.
optionDragonBone
.
skeJsonData2
[
texJsonData
]=
option
.
optionDragonBone
.
texJsonData2
[
texPngData
]=
option
.
optionDragonBone
.
texPngData2
(
save
)="
saveAnima2
($
event
,
option
.
optionDragonBone
)"
(
refreshEmitter
)="
refresh
()"
>
</app-upload-dragon-bone>
<br>
<div
*
ngIf=
"(question.optionList.length >= 4)"
>
<button
style=
"margin-top: 20px; width: 100%; height: 32px; color: red;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
removeOption
(
i
,
j
)"
>
删除选项
</button>
<div
style=
"height: 330px;width:100%"
>
<span
style=
"height: 30px; font-size: 18px;"
>
第{{i + 1}}页题干:
</span>
<div
*
ngFor=
"let option of question.optionList; let j = index"
>
<div
style=
"margin-top: 20px; float: left; border-width: 1px; border-style: dotted;
padding: 20px; margin-right: 20px; width: 230px;"
>
<span
style=
"height: 30px; font-size: 18px;"
>
题干音频:
</span>
<app-audio-recorder
[
audioUrl
]="
option
.
optionAudio
"
(
audioUploaded
)="
onOptionUploadSuccess
($
event
,
i
,
j
)"
>
</app-audio-recorder>
<br>
<span
style=
"height: 30px; font-size: 18px;"
>
题干文本:
</span>
<input
style=
"width: 150px; "
type=
"text"
maxlength=
""
nz-input
[(
ngModel
)]="
option
.
text
"
(
blur
)="
save
()"
>
<br>
<span
style=
"height: 30px; font-size: 18px;"
>
题干骨骼动画:
</span>
<app-upload-dragon-bone
[
btnName
]="[['配置骨骼动画']]"
[
animaNames
]="[[['
normal
']]]"
[
skeJsonData
]=
option
.
optionDragonBone
.
skeJsonData
[
texJsonData
]=
option
.
optionDragonBone
.
texJsonData
[
texPngData
]=
option
.
optionDragonBone
.
texPngData
(
save
)="
saveAnima
($
event
,
option
.
optionDragonBone
)"
(
refreshEmitter
)="
refresh
()"
>
</app-upload-dragon-bone>
<br>
</div>
</div>
<div
*
ngIf=
"(question.optionList.length < 4)"
>
<button
style=
"margin-top: 20px; float: left; border-width: 1px;
border-style: dotted; padding: 20px; margin-right: 20px;
width: 230px; height: 263px;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
addOption
(
i
)"
>
增加选项
</button>
</div>
</div>
<div
*
ngIf=
"(question.optionList.length < 4)"
>
<button
style=
"margin-top: 20px; float: left; border-width: 1px;
border-style: dotted; padding: 20px; margin-right: 20px;
width: 230px; height: 343px;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
addOption
(
i
)"
>
增加选项
</button>
<div
style=
"height: 330px;width:100%"
>
<span
style=
"height: 30px; font-size: 18px;"
>
第{{i + 1}}页选项:
</span>
<div
*
ngFor=
"let option of question.optionList; let j = index"
>
<div
style=
"margin-top: 20px; float: left; border-width: 1px; border-style: dotted;
padding: 20px; margin-right: 20px; width: 230px;"
>
<span
style=
"height: 30px; font-size: 18px;"
>
选项骨骼动画:
</span>
<app-upload-dragon-bone
[
btnName
]="[['配置骨骼动画']]"
[
animaNames
]="[[['
normal
']]]"
[
skeJsonData
]=
option
.
optionDragonBone
.
skeJsonData2
[
texJsonData
]=
option
.
optionDragonBone
.
texJsonData2
[
texPngData
]=
option
.
optionDragonBone
.
texPngData2
(
save
)="
saveAnima2
($
event
,
option
.
optionDragonBone
)"
(
refreshEmitter
)="
refresh
()"
>
</app-upload-dragon-bone>
<br>
<div
*
ngIf=
"(question.optionList.length >= 4)"
>
<button
style=
"margin-top: 20px; width: 100%; height: 32px; color: red;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
removeOption
(
i
,
j
)"
>
删除选项
</button>
</div>
</div>
</div>
</div>
</div>
<button
style=
"margin-left: 5%; margin-top: 50px;margin-bottom: 8px; width: 90%; height: 32px; color: red;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
removeQuestion
(
i
)"
>
<button
style=
"margin-left: 5%; margin-top: 50px;margin-bottom: 8px; width: 90%; height: 32px; color: red;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
removeQuestion
(
i
)"
>
删除问题{{i+1}}
</button>
</div>
...
...
play/assets/tmpGame/prefabs/ItemAnswer.prefab
View file @
04f9197a
...
...
@@ -25,19 +25,16 @@
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 1
4
"__id__": 1
1
}
],
"_prefab": {
"__id__": 1
5
"__id__": 1
2
},
"_opacity": 255,
"_color": {
...
...
@@ -304,115 +301,6 @@
"fileId": "776VL7shBKgrZcDDncGnvr",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_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,
-5.671,
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__": 8
},
"_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__": "b125237b-1bc1-4ec8-9b7b-60c16e96c5ae"
},
"fileId": "98kpAv+6RPI6x75ze5gWIu",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "bg_light",
...
...
@@ -424,11 +312,11 @@
"_active": false,
"_components": [
{
"__id__":
12
"__id__":
9
}
],
"_prefab": {
"__id__": 1
3
"__id__": 1
0
},
"_opacity": 255,
"_color": {
...
...
@@ -482,7 +370,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
11
"__id__":
8
},
"_enabled": true,
"_materials": [
...
...
@@ -539,11 +427,8 @@
"sprBg": {
"__id__": 3
},
"labText": {
"__id__": 9
},
"nodLight": {
"__id__":
11
"__id__":
8
},
"dragonBone": {
"__id__": 6
...
...
play/assets/tmpGame/scene/Scene.fire
View file @
04f9197a
...
...
@@ -803,9 +803,9 @@
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 2
55
,
"g":
255
,
"b":
255
,
"r": 2
11
,
"g":
156
,
"b":
70
,
"a": 255
},
"_contentSize": {
...
...
play/assets/tmpGame/script/ItemAnswer.js
View file @
04f9197a
...
...
@@ -4,7 +4,6 @@ cc.Class({
properties
:
{
spfBase
:
[
cc
.
SpriteFrame
],
sprBg
:
cc
.
Sprite
,
labText
:
cc
.
Label
,
nodLight
:
cc
.
Node
,
dragonBone
:
dragonBones
.
ArmatureDisplay
,
audRight
:
cc
.
AudioClip
,
...
...
@@ -37,13 +36,12 @@ cc.Class({
}
},
setInfo
(
data
,
index
,
scene
,
optionCount
)
{
setInfo
(
data
,
index
,
scene
)
{
this
.
scene
=
scene
;
this
.
data
=
data
;
this
.
index
=
index
;
this
.
labText
.
string
=
index
;
this
.
loadDragonBone
();
if
(
optionCount
==
3
)
{
if
(
index
&
2
==
0
)
{
this
.
sprBg
.
spriteFrame
=
this
.
spfBase
[
0
];
}
else
{
this
.
sprBg
.
spriteFrame
=
this
.
spfBase
[
1
];
...
...
@@ -86,7 +84,7 @@ cc.Class({
}
this
.
dragonBone
.
armatureName
=
data
.
name
;
this
.
animationName
=
data
.
animation
[
0
].
name
;
// this.dragonBone.premultipliedAlpha = true;
// atlas.texture.setPremultiplyAlpha(true);
}
...
...
play/assets/tmpGame/script/Scene.js
View file @
04f9197a
...
...
@@ -169,7 +169,7 @@ cc.Class({
answer
.
x
=
this
.
getItemX
(
optionList
,
answerIndexs
[
index
]
-
1
);
answerIndexs
.
splice
(
index
,
1
);
answer
.
getComponent
(
'
ItemAnswer
'
).
setInfo
(
optionList
[
i
],
i
,
this
,
optionList
.
length
);
answer
.
getComponent
(
'
ItemAnswer
'
).
setInfo
(
optionList
[
i
],
i
,
this
);
}
},
getItemX
(
optionList
,
index
)
{
...
...
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