Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg10_ty
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
dg10_ty
Commits
19aa0e5c
Commit
19aa0e5c
authored
Nov 09, 2025
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加题干
parent
70a95770
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
722 additions
and
417 deletions
+722
-417
dg10_ty.fire
assets/dg10_ty/scene/dg10_ty.fire
+674
-417
dg10_ty.ts
assets/dg10_ty/scene/dg10_ty.ts
+5
-0
dg10Game_dg10_ty.ts
assets/dg10_ty/scene/tool/dg10Game_dg10_ty.ts
+2
-0
bg_question_panel.png
assets/dg10_ty/textures/bg_question_panel.png
+0
-0
bg_question_panel.png.meta
assets/dg10_ty/textures/bg_question_panel.png.meta
+36
-0
form.component.html
form/src/app/form/form.component.html
+4
-0
form.component.ts
form/src/app/form/form.component.ts
+1
-0
No files found.
assets/dg10_ty/scene/dg10_ty.fire
View file @
19aa0e5c
This diff is collapsed.
Click to expand it.
assets/dg10_ty/scene/dg10_ty.ts
View file @
19aa0e5c
...
@@ -208,10 +208,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -208,10 +208,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
bubbleCreate
()
{
private
bubbleCreate
()
{
let
layout_play
=
this
.
layout_game
.
getChildByName
(
'
layout_play
'
)
let
layout_play
=
this
.
layout_game
.
getChildByName
(
'
layout_play
'
)
layout_play
.
removeAllChildren
();
layout_play
.
removeAllChildren
();
const
layoutQuestion
=
this
.
layout_game
.
getChildByName
(
'
layout_text
'
);
let
layout_text
=
layoutQuestion
.
getChildByName
(
'
text
'
);
let
layout_pop
=
this
.
layout_game
.
getChildByName
(
'
layout_pop
'
)
let
layout_pop
=
this
.
layout_game
.
getChildByName
(
'
layout_pop
'
)
let
btn_fish
=
this
.
layout_game
.
getChildByName
(
'
btn_fish
'
)
let
btn_fish
=
this
.
layout_game
.
getChildByName
(
'
btn_fish
'
)
let
item
=
this
.
layout_game
.
getChildByName
(
'
item
'
)
let
item
=
this
.
layout_game
.
getChildByName
(
'
item
'
)
layout_text
.
getComponent
(
cc
.
Label
).
string
=
this
.
starData
.
questionText
||
""
;
layoutQuestion
.
active
=
this
.
starData
.
questionText
?
true
:
false
;
let
list
=
this
.
starData
.
options
;
let
list
=
this
.
starData
.
options
;
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
list
.
sort
(()
=>
Math
.
random
()
<
0.5
?
1
:
-
1
)
list
.
sort
(()
=>
Math
.
random
()
<
0.5
?
1
:
-
1
)
...
...
assets/dg10_ty/scene/tool/dg10Game_dg10_ty.ts
View file @
19aa0e5c
...
@@ -17,6 +17,7 @@ export class Option {
...
@@ -17,6 +17,7 @@ export class Option {
}
}
export
class
Question
{
export
class
Question
{
public
questionText
:
string
;
public
txt
;
public
txt
;
public
audioUrl
;
public
audioUrl
;
public
data
;
public
data
;
...
@@ -30,6 +31,7 @@ export class Question {
...
@@ -30,6 +31,7 @@ export class Question {
constructor
(
data
,
id
)
{
constructor
(
data
,
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
count
=
0
;
this
.
count
=
0
;
this
.
questionText
=
data
.
questionText
;
this
.
txt
=
data
.
text
;
this
.
txt
=
data
.
text
;
this
.
time
=
data
.
duration
;
this
.
time
=
data
.
duration
;
this
.
audioUrl
=
data
.
audio
;
this
.
audioUrl
=
data
.
audio
;
...
...
assets/dg10_ty/textures/bg_question_panel.png
0 → 100644
View file @
19aa0e5c
7 KB
assets/dg10_ty/textures/bg_question_panel.png.meta
0 → 100644
View file @
19aa0e5c
{
"ver": "2.3.5",
"uuid": "300884ed-edca-4c8b-be1e-69307e6fa539",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 1911,
"height": 248,
"platformSettings": {},
"subMetas": {
"bg_question_panel": {
"ver": "1.0.4",
"uuid": "c66e6b6b-54f7-4c58-bdf4-2da77a8172cb",
"rawTextureUuid": "300884ed-edca-4c8b-be1e-69307e6fa539",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1911,
"height": 248,
"rawWidth": 1911,
"rawHeight": 248,
"borderTop": 40,
"borderBottom": 40,
"borderLeft": 1911,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
form/src/app/form/form.component.html
View file @
19aa0e5c
...
@@ -137,6 +137,10 @@
...
@@ -137,6 +137,10 @@
<div
*
ngFor=
"let option of question.options; let m = index"
>
<div
*
ngFor=
"let option of question.options; let m = index"
>
<div
style=
"display: flex;margin-top: 20px;"
>
<div
style=
"display: flex;margin-top: 20px;"
>
<div
class=
"border-dashed"
style=
"min-width: 700px;"
>
<div
class=
"border-dashed"
style=
"min-width: 700px;"
>
<div
style=
"width: 400px"
>
<span
style=
"font-size: 20px;"
>
题干
</span>
<textarea
nz-input
rows=
"3"
[(
ngModel
)]="
option
.
questionText
"
(
blur
)="
save
()"
></textarea>
</div>
<div
style=
"margin-top: 20px;"
>
<div
style=
"margin-top: 20px;"
>
<div
class=
"word-type-option-title"
>
<div
class=
"word-type-option-title"
>
选项类型:
选项类型:
...
...
form/src/app/form/form.component.ts
View file @
19aa0e5c
...
@@ -41,6 +41,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -41,6 +41,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addQuestion
()
{
addQuestion
()
{
this
.
item
.
questions
.
push
({
this
.
item
.
questions
.
push
({
questionText
:
""
,
audio
:
''
,
audio
:
''
,
time
:
null
,
time
:
null
,
duration
:
""
,
duration
:
""
,
...
...
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