Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jj15_zww
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
jj15_zww
Commits
4cba23aa
Commit
4cba23aa
authored
Apr 10, 2024
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流程走完待细节调整
parent
8ab7dab4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
57 deletions
+52
-57
jj16_lianci.fire
assets/jj16_lianci/scene/jj16_lianci.fire
+3
-3
jj16_lianci.ts
assets/jj16_lianci/scene/jj16_lianci.ts
+49
-54
No files found.
assets/jj16_lianci/scene/jj16_lianci.fire
View file @
4cba23aa
...
...
@@ -3998,8 +3998,8 @@
"_color": {
"__type__": "cc.Color",
"r": 255,
"g":
0
,
"b":
0
,
"g":
255
,
"b":
255
,
"a": 255
},
"_contentSize": {
...
...
@@ -4342,7 +4342,7 @@
"__id__": 98
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [],
"_prefab": null,
"_opacity": 255,
...
...
assets/jj16_lianci/scene/jj16_lianci.ts
View file @
4cba23aa
...
...
@@ -518,7 +518,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
view
.
setNetImg
(
image_text_image
,
data
.
image
,
{
w
:
240
,
h
:
270
})
}
}
private
currentD
ata
:
any
;
private
currentD
t
:
any
;
private
currentItem
:
any
;
@
property
(
cc
.
Node
)
...
...
@@ -547,7 +547,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
item
=
e
.
target
;
let
data
=
item
.
data
;
this
.
currentItem
=
item
;
this
.
currentD
ata
=
data
;
this
.
currentD
t
=
data
;
this
.
touchForbid
=
true
;
// 移动钩子过来 然后弹出面板
...
...
@@ -567,44 +567,50 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
btn_close
:
cc
.
Node
=
null
;
showRecord
(
item
)
{
this
.
layout_record
.
active
=
true
;
// 卡片显示
let
card
=
pg
.
view
.
find
(
this
.
layout_record
,
'
card
'
)
this
.
updateCard
(
card
,
this
.
currentDt
)
// 音频处理
let
btn_voice
=
pg
.
view
.
find
(
this
.
layout_record
,
'
btn_voice
'
)
btn_voice
.
data
=
this
.
currentDt
;
// 展示待录音内容
// let btn_voice = pg.view.find(layer, "btn_voice");
// let normal = pg.view.find(btn_voice, 'normal')
// cc.tween(normal)
// .repeatForever(
// cc.tween()
// .to(0.7, { scale: 1.1 })
// .delay(0.3)
// .to(0.7, { scale: 1.00 })
// .delay(0.3)
// )
// .start();
let
normal
=
pg
.
view
.
find
(
btn_voice
,
'
normal
'
)
let
ing
=
pg
.
view
.
find
(
btn_voice
,
'
ing
'
)
pg
.
view
.
visible
(
normal
,
true
)
pg
.
view
.
visible
(
ing
,
false
)
cc
.
tween
(
normal
)
.
repeatForever
(
cc
.
tween
()
.
to
(
0.2
,
{
angle
:
-
18
})
.
to
(
0.2
,
{
angle
:
0
})
.
to
(
0.2
,
{
angle
:
18
})
.
to
(
0.2
,
{
angle
:
0
})
.
to
(
0.2
,
{
angle
:
-
18
})
.
to
(
0.2
,
{
angle
:
0
})
.
to
(
0.2
,
{
angle
:
18
})
.
to
(
0.2
,
{
angle
:
0
})
.
to
(
0.2
,
{
angle
:
-
18
})
.
to
(
0.2
,
{
angle
:
0
})
.
to
(
0.2
,
{
angle
:
18
})
.
to
(
0.2
,
{
angle
:
0
})
.
delay
(
1
)
)
.
start
();
// this.btn_voice_time_id = setTimeout(() => {
// if (!this.node || !this.node.parent) return;
// // 摇晃mic
// this.playLocalAudio("wait")
// cc.tween(normal).to(0.25, { angle: -15 }).to(0.25, { angle: 0 }).to(0.25, { angle: 15 }).to(0.25, { angle: 0 }).start();
// }, 3000);
pg
.
view
.
touchOn
(
btn_voice
,
this
.
onTouchCardRecord
,
this
)
}
onTouchRecordClose
()
{
this
.
layout_record
.
active
=
false
;
}
// 前后切换一共有
updateRecordBtns
(
layer
)
{
let
btn_voice
=
pg
.
view
.
find
(
layer
,
"
btn_voice
"
);
let
btn_play
=
pg
.
view
.
find
(
layer
,
"
btn_play
"
);
let
recordData
=
layer
.
data
.
recordData
;
if
(
recordData
)
{
btn_voice
.
x
=
-
60
;
pg
.
view
.
visible
(
btn_voice
,
true
);
pg
.
view
.
visible
(
btn_play
,
true
);
}
else
{
btn_voice
.
x
=
0
;
pg
.
view
.
visible
(
btn_voice
,
true
);
pg
.
view
.
visible
(
btn_play
,
false
);
}
}
// current 和 currentCard
btn_voice_time_id
:
any
;
currentCard
:
cc
.
Node
;
...
...
@@ -617,25 +623,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
// 录音
let
btn_voice
=
e
.
target
;
let
layer
=
btn_voice
.
parent
;
let
normal
=
pg
.
view
.
find
(
btn_voice
,
'
normal
'
)
let
ing
=
pg
.
view
.
find
(
btn_voice
,
'
ing
'
)
this
.
playLocalAudio
(
"
touch_voice
"
)
this
.
checkCardsTime
=
999999
;
hw
.
record
.
startTest
(
layer
.
data
.
text
).
then
((
isSuccess
)
=>
{
hw
.
record
.
startTest
(
this
.
currentDt
.
text
).
then
((
isSuccess
)
=>
{
if
(
!
isSuccess
)
{
this
.
recording
=
false
;
// 录音中
hw
.
record
.
endTest
().
then
((
recordData
:
any
)
=>
{
layer
.
data
.
recordData
=
recordData
;
this
.
currentDt
.
recordData
=
recordData
;
this
.
currentCard
=
null
;
pg
.
view
.
visible
(
normal
,
true
);
pg
.
view
.
visible
(
ing
,
false
);
let
ingBg
=
pg
.
view
.
find
(
ing
,
'
bg
'
);
ingBg
.
getComponent
(
ImgAuto
).
playVoiceEnd
();
this
.
updateRecordBtns
(
layer
);
let
score
=
recordData
.
result
.
overall
this
.
updatePopAni
(
layer
,
score
);
this
.
updatePopAni
(
null
,
score
);
this
.
checkCardsTime
=
3
;
})
}
else
{
...
...
@@ -649,48 +653,39 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
private
showFires
:
any
;
updatePopAni
(
front
,
score
)
{
let
btn_play
=
pg
.
view
.
find
(
front
,
'
btn_play
'
)
let
result
=
pg
.
view
.
find
(
btn_play
,
'
result
'
)
//
let btn_play = pg.view.find(front, 'btn_play')
//
let result = pg.view.find(btn_play, 'result')
let
layout_ani
=
pg
.
view
.
find
(
this
,
'
layout_ani
'
)
layout_ani
.
active
=
true
;
if
(
score
>=
9
0
)
{
if
(
score
>=
7
0
)
{
hw
.
log
.
d
(
"
非常棒
"
)
front
.
data
.
isChose
=
"
right
"
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
excellent
'
),
true
)
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
good
'
),
false
)
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
tryagain
'
),
false
)
let
item
=
pg
.
view
.
find
(
layout_ani
,
'
JJ_Excellent_ske
'
)
item
.
active
=
true
;
pg
.
view
.
playDBAnimation
(
item
,
'
newAnimation
'
,
1
);
this
.
playLocalAudio
(
"
record_right
"
)
}
else
if
(
score
>=
60
)
{
hw
.
log
.
d
(
"
干的不错
"
)
front
.
data
.
isChose
=
"
right
"
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
excellent
'
),
false
)
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
good
'
),
true
)
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
tryagain
'
),
false
)
let
item
=
pg
.
view
.
find
(
layout_ani
,
'
JJ_Good_ske
'
)
item
.
active
=
true
;
pg
.
view
.
playDBAnimation
(
item
,
'
newAnimation
'
,
1
);
this
.
playLocalAudio
(
"
record_right
"
)
this
.
recordExcellent
();
}
else
{
hw
.
log
.
d
(
"
再试一次吧
"
)
front
.
data
.
isChose
=
"
wrong
"
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
excellent
'
),
false
)
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
good
'
),
false
)
pg
.
view
.
visible
(
pg
.
view
.
find
(
result
,
'
tryagain
'
),
true
)
let
item
=
pg
.
view
.
find
(
layout_ani
,
'
JJ_Tryagain_ske
'
)
item
.
active
=
true
;
pg
.
view
.
playDBAnimation
(
item
,
'
better
'
,
1
);
this
.
playLocalAudio
(
"
record_wrong
"
)
this
.
recordTryAgain
();
}
}
recordExcellent
()
{
if
(
!
this
.
showFires
)
this
.
showFires
=
{};
if
(
!
this
.
showFires
[
`
${
this
.
count
}
`
])
{
this
.
showFires
[
`
${
this
.
count
}
`
]
=
true
;
hw
.
util
.
playEndTrebleFirework
();
}
this
.
onTouchRecordClose
();
}
recordTryAgain
()
{
}
private
currentPlayAudioId
:
any
;
onTouchCardPlay
(
e
)
{
if
(
this
.
touchForbid
)
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