Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn19_read
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
sn19_read
Commits
20af45f8
Commit
20af45f8
authored
Nov 09, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8299aa28
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
22 deletions
+6
-22
LayoutTip_sn17_danci.ts
assets/sn17_danci/scene/LayoutTip_sn17_danci.ts
+0
-13
sn17_danci.fire
assets/sn17_danci/scene/sn17_danci.fire
+0
-3
sn17_danci.ts
assets/sn17_danci/scene/sn17_danci.ts
+6
-6
No files found.
assets/sn17_danci/scene/LayoutTip_sn17_danci.ts
View file @
20af45f8
...
@@ -77,21 +77,8 @@ export default class LayoutTip extends cc.Component {
...
@@ -77,21 +77,8 @@ export default class LayoutTip extends cc.Component {
}
else
{
}
else
{
type
=
score
>
60
?
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_EXCELLENT
:
score
>
10
?
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_GOOD
:
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_TRYAGAIN
;
type
=
score
>
60
?
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_EXCELLENT
:
score
>
10
?
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_GOOD
:
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_TRYAGAIN
;
}
}
this
.
img_wrong
.
active
=
type
==
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_WRONG
;
this
.
img_wrong
.
active
&&
pg
.
hw
.
playLocalAudio
(
'
error
'
)
this
.
img_right
.
active
=
type
==
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_RIGHT
;
this
.
img_right
.
active
=
type
==
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_RIGHT
;
this
.
img_right
.
active
&&
pg
.
hw
.
playLocalAudio
(
'
right
'
)
this
.
img_right
.
active
&&
pg
.
hw
.
playLocalAudio
(
'
right
'
)
this
.
img_excellent
.
active
=
type
==
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_EXCELLENT
;
this
.
img_excellent
.
active
&&
pg
.
hw
.
playLocalAudio
(
'
excellent
'
)
this
.
img_good
.
active
=
type
==
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_GOOD
;
this
.
img_good
.
active
&&
pg
.
hw
.
playLocalAudio
(
'
good
'
)
this
.
img_tryagain
.
active
=
type
==
LayoutTip
.
LAYOUT_TIP_TYPE
.
LAYOUT_TIP_TYPE_TRYAGAIN
;
this
.
img_tryagain
.
active
&&
pg
.
hw
.
playLocalAudio
(
'
tryagain
'
)
this
.
log
(
"
this.img_wrong.active->
"
+
this
.
img_wrong
.
active
)
this
.
log
(
"
this.img_right.active->
"
+
this
.
img_right
.
active
)
this
.
log
(
"
this.img_excellent.active->
"
+
this
.
img_excellent
.
active
)
this
.
log
(
"
this.img_good.active->
"
+
this
.
img_good
.
active
)
this
.
log
(
"
this.img_tryagain.active->
"
+
this
.
img_tryagain
.
active
)
}
}
...
...
assets/sn17_danci/scene/sn17_danci.fire
View file @
20af45f8
...
@@ -8612,9 +8612,6 @@
...
@@ -8612,9 +8612,6 @@
"btn_next": {
"btn_next": {
"__id__": 72
"__id__": 72
},
},
"label_title": {
"__id__": 48
},
"btn_voice": {
"btn_voice": {
"__id__": 49
"__id__": 49
},
},
...
...
assets/sn17_danci/scene/sn17_danci.ts
View file @
20af45f8
...
@@ -186,7 +186,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -186,7 +186,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
updateBtns
()
{
updateBtns
()
{
if
(
this
.
CurrentData
)
{
if
(
this
.
CurrentData
)
{
pg
.
view
.
setString
(
this
.
label_title
,
this
.
CurrentData
.
text
);
pg
.
view
.
setString
(
this
.
label_round
,
`
${
this
.
count
+
1
}
/
${
this
.
list
.
length
}
`
);
pg
.
view
.
setString
(
this
.
label_round
,
`
${
this
.
count
+
1
}
/
${
this
.
list
.
length
}
`
);
}
}
...
@@ -244,12 +243,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -244,12 +243,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
view
.
visible
(
this
.
btn_record
,
true
)
pg
.
view
.
visible
(
this
.
btn_record
,
true
)
this
.
btn_record
.
y
=
-
550
;
this
.
btn_record
.
y
=
-
550
;
cc
.
tween
(
this
.
btn_record
).
to
(
0.3
,
{
y
:
0
}).
start
();
cc
.
tween
(
this
.
btn_record
).
to
(
0.3
,
{
y
:
0
}).
start
();
let
com
=
this
.
btn_record
.
getC
omponent
(
ImgAuto4
);
let
com
=
this
.
btn_record
.
getC
hildByName
(
"
img_voice
"
).
getComponent
(
ImgAuto
);
com
.
playVoiceStart
();
com
.
playVoiceStart
();
}
}
hideVoiceFlash
()
{
hideVoiceFlash
()
{
pg
.
view
.
visible
(
this
.
btn_record
,
false
)
pg
.
view
.
visible
(
this
.
btn_record
,
false
)
let
com
=
this
.
btn_record
.
getC
omponent
(
ImgAuto4
);
let
com
=
this
.
btn_record
.
getC
hildByName
(
"
img_voice
"
).
getComponent
(
ImgAuto
);
com
.
playVoiceEnd
();
com
.
playVoiceEnd
();
}
}
...
@@ -531,15 +530,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -531,15 +530,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
public
btn_next
:
cc
.
Node
=
null
;
public
btn_next
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
public
label_title
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
public
btn_voice
:
cc
.
Node
=
null
;
public
btn_voice
:
cc
.
Node
=
null
;
updateLayer
(
layer
,
data
)
{
updateLayer
(
layer
,
data
)
{
let
img
=
pg
.
view
.
find
(
layer
,
'
img
'
);
// 根据数据来渲染
// 根据数据来渲染
let
img
=
pg
.
view
.
find
(
layer
,
'
img
'
);
img
.
active
=
true
;
img
.
active
=
true
;
// 需要根据图片设定的类型来动态的识别对应的图片大小 和不同的背景图
pg
.
view
.
setNetImg
(
img
,
data
.
image
,
{
w
:
1330
,
h
:
655
})
pg
.
view
.
setNetImg
(
img
,
data
.
image
,
{
w
:
1330
,
h
:
655
})
}
}
onTouchVoice
(
e
)
{
onTouchVoice
(
e
)
{
if
(
this
.
voiceTouchForbid
)
return
;
if
(
this
.
voiceTouchForbid
)
return
;
...
...
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