Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy14_pipei
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
hy14_pipei
Commits
de647dcf
Commit
de647dcf
authored
Jul 12, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5338880d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
342 additions
and
219 deletions
+342
-219
LayerBack_hy14_pipei.ts
assets/hy14_pipei/common/layer_back/LayerBack_hy14_pipei.ts
+7
-2
hy14_pipei.fire
assets/hy14_pipei/scene/hy14_pipei.fire
+335
-217
No files found.
assets/hy14_pipei/common/layer_back/LayerBack_hy14_pipei.ts
View file @
de647dcf
...
@@ -6,12 +6,15 @@ import pg from "../../scene/pg_hy14_pipei";
...
@@ -6,12 +6,15 @@ import pg from "../../scene/pg_hy14_pipei";
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
@
ccclass
export
default
class
LayerBack
extends
cc
.
Component
{
export
default
class
LayerBack
extends
cc
.
Component
{
private
btn_back
:
cc
.
Node
;
private
btn_back
:
cc
.
Node
;
private
img_npc_voice
:
cc
.
Node
;
private
img_npc_voice
:
cc
.
Node
;
private
bg_forbid
:
cc
.
Node
;
onLoad
()
{
onLoad
()
{
this
.
initView
();
this
.
initView
();
this
.
initEvent
();
this
.
initEvent
();
...
@@ -20,6 +23,7 @@ export default class LayerBack extends cc.Component {
...
@@ -20,6 +23,7 @@ export default class LayerBack extends cc.Component {
initView
()
{
initView
()
{
this
.
bg_forbid
=
pg
.
view
.
find
(
this
,
'
bg_forbid
'
)
this
.
btn_back
=
pg
.
view
.
find
(
this
,
'
btn_back
'
)
this
.
btn_back
=
pg
.
view
.
find
(
this
,
'
btn_back
'
)
this
.
label_title
=
pg
.
view
.
find
(
this
,
'
label_title
'
)
this
.
label_title
=
pg
.
view
.
find
(
this
,
'
label_title
'
)
this
.
img_npc_voice
=
pg
.
view
.
find
(
this
.
label_title
,
'
img_npc_voice
'
)
this
.
img_npc_voice
=
pg
.
view
.
find
(
this
.
label_title
,
'
img_npc_voice
'
)
...
@@ -39,6 +43,7 @@ export default class LayerBack extends cc.Component {
...
@@ -39,6 +43,7 @@ export default class LayerBack extends cc.Component {
pg
.
event
.
on
(
'
npc_layer_back_init
'
,
(
data
)
=>
{
pg
.
event
.
on
(
'
npc_layer_back_init
'
,
(
data
)
=>
{
this
.
updateView
(
data
);
this
.
updateView
(
data
);
if
(
!
this
.
npcAudio
)
{
if
(
!
this
.
npcAudio
)
{
pg
.
view
.
visible
(
this
.
bg_forbid
,
false
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
);
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
);
}
else
{
}
else
{
this
.
playVoiceStart
();
this
.
playVoiceStart
();
...
@@ -56,13 +61,14 @@ export default class LayerBack extends cc.Component {
...
@@ -56,13 +61,14 @@ export default class LayerBack extends cc.Component {
this
.
schedule
(
this
.
playVoiceRunning
,
0.3
)
this
.
schedule
(
this
.
playVoiceRunning
,
0.3
)
pg
.
audio
.
playAudioByUrl
(
this
.
npcAudio
,
()
=>
{
pg
.
audio
.
playAudioByUrl
(
this
.
npcAudio
,
()
=>
{
this
.
playVoiceEnd
();
this
.
playVoiceEnd
();
pg
.
view
.
visible
(
this
.
bg_forbid
,
false
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
)
},
(
audioId
)
=>
{
},
(
audioId
)
=>
{
this
.
audioId
=
audioId
;
this
.
audioId
=
audioId
;
});
});
}
}
playVoiceRunning
()
{
playVoiceRunning
()
{
if
(
!
this
.
img_npc_voice
)
{
if
(
!
this
.
img_npc_voice
)
{
this
.
unschedule
(
this
.
playVoiceRunning
)
this
.
unschedule
(
this
.
playVoiceRunning
)
return
;
return
;
}
}
...
@@ -94,4 +100,3 @@ export default class LayerBack extends cc.Component {
...
@@ -94,4 +100,3 @@ export default class LayerBack extends cc.Component {
assets/hy14_pipei/scene/hy14_pipei.fire
View file @
de647dcf
This diff is collapsed.
Click to expand it.
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