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
ebe05d12
Commit
ebe05d12
authored
Nov 03, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理完成
parent
d7d49058
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1136 additions
and
1005 deletions
+1136
-1005
dg10_ty.fire
assets/dg10_ty/scene/dg10_ty.fire
+1072
-979
dg10_ty.ts
assets/dg10_ty/scene/dg10_ty.ts
+23
-3
dg10_ty_xiaodi.ts
assets/dg10_ty/scene/dg10_ty_xiaodi.ts
+39
-23
defaultData_dg10_ty.ts
assets/dg10_ty/script/defaultData_dg10_ty.ts
+2
-0
No files found.
assets/dg10_ty/scene/dg10_ty.fire
View file @
ebe05d12
This diff is collapsed.
Click to expand it.
assets/dg10_ty/scene/dg10_ty.ts
View file @
ebe05d12
...
...
@@ -68,8 +68,28 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initData
();
this
.
initView
();
this
.
initEvent
();
this
.
startShowXiaodi
().
then
(()
=>
{
this
.
endShowXiaodi
();
this
.
startTime
();
this
.
updateTop
();
})
}
startShowXiaodi
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
this
.
data
.
npcAudio
)
return
resolve
(
''
);
pg
.
view
.
find
(
this
,
'
layout_xiaodi/btn_go
'
).
active
=
false
;
pg
.
view
.
find
(
this
,
'
layout_xiaodi
'
).
active
=
true
;
pg
.
view
.
find
(
this
,
'
layout_xiaodi
'
).
getComponent
(
dg_xiaodi
).
playEnter
(
this
.
data
.
npcAudio
).
then
(()
=>
{
resolve
(
''
);
})
});
}
endShowXiaodi
()
{
if
(
!
this
.
data
.
npcAudio
)
return
;
pg
.
view
.
find
(
this
,
'
layout_xiaodi
'
).
active
=
true
;
pg
.
view
.
find
(
this
,
'
layout_xiaodi
'
).
getComponent
(
dg_xiaodi
).
playEnterEnd
()
}
protected
onDestroy
():
void
{
pg
.
event
.
clear
();
...
...
@@ -118,7 +138,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc
.
audioEngine
.
stopAllEffects
();
this
.
layout_start
=
pg
.
view
.
find
(
this
,
"
layout_start
"
);
this
.
layout_start
.
active
=
true
;
if
(
Game
.
getIns
().
title
)
{
cc
.
find
(
"
layout_info/label_title
"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
Game
.
getIns
().
title
;
...
...
@@ -451,6 +470,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
async
startTime
()
{
this
.
layout_start
.
active
=
true
;
for
(
let
i
=
3
;
i
>=
0
;
i
--
)
{
let
target
=
cc
.
find
(
"
layout_start/text_
"
+
i
,
this
.
node
);
if
(
i
==
0
)
this
.
playLocalAudio
(
"
go
"
)
...
...
assets/dg10_ty/scene/dg10_ty_xiaodi.ts
View file @
ebe05d12
...
...
@@ -15,6 +15,7 @@ export default class dg_xiaodi extends cc.Component {
}
private
audioIdEnter
:
any
;
playEnter
(
audioUrl
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
node
.
active
=
true
;
let
startX
=
this
.
defaultX
+
this
.
moveX
;
this
.
aniRole
.
x
=
startX
;
...
...
@@ -25,7 +26,7 @@ export default class dg_xiaodi extends cc.Component {
this
.
aniRole
.
scaleX
=
-
this
.
aniRole
.
scaleX
;
}
})
.
to
(
0.3
,
{
x
:
this
.
defaultX
})
.
to
(
0.5
,
{
x
:
0
})
.
call
(()
=>
{
if
(
this
.
moveX
<
0
)
{
this
.
aniRole
.
scaleX
=
-
this
.
aniRole
.
scaleX
;
...
...
@@ -34,12 +35,27 @@ export default class dg_xiaodi extends cc.Component {
pg
.
audio
.
playAudioByUrl
(
audioUrl
,
()
=>
{
this
.
audioIdEnter
=
null
;
pg
.
view
.
playDBAnimation
(
this
.
aniRole
,
'
normal
'
);
cc
.
tween
(
this
.
aniRole
)
.
call
(()
=>
{
pg
.
view
.
playDBAnimation
(
this
.
aniRole
,
'
run
'
);
if
(
this
.
moveX
<
0
)
{
this
.
aniRole
.
scaleX
=
-
this
.
aniRole
.
scaleX
;
}
})
.
to
(
0.5
,
{
x
:
1500
})
.
call
(()
=>
{
this
.
scheduleOnce
(()
=>
{
resolve
(
''
);
},
0.5
)
})
.
start
();
},
audioId
=>
{
this
.
audioIdEnter
=
audioId
;
})
})
.
start
();
});
}
playEnterEnd
()
{
this
.
node
.
active
=
false
;
...
...
assets/dg10_ty/script/defaultData_dg10_ty.ts
View file @
ebe05d12
export
const
defaultData
=
{
"
npcAudioText
"
:
"
退出
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3
"
,
"
npcAudioName
"
:
"
paomo_hy11_plp.mp3
"
,
"
npcAudioEnd
"
:
"
http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3
"
,
"
npcAudioEndName
"
:
"
paomo_hy11_plp.mp3
"
,
"
title
"
:
"
听音选择
"
,
"
questions
"
:
[{
...
...
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