Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG22
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
DG22
Commits
8d8b6143
Commit
8d8b6143
authored
Nov 28, 2023
by
杨一航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 流程调整
parent
0243e50c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
275 additions
and
81 deletions
+275
-81
DG22.fire
assets/DG22/scene/DG22.fire
+249
-78
DG22.ts
assets/DG22/scene/DG22.ts
+26
-3
No files found.
assets/DG22/scene/DG22.fire
View file @
8d8b6143
This diff is collapsed.
Click to expand it.
assets/DG22/scene/DG22.ts
View file @
8d8b6143
...
@@ -20,7 +20,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -20,7 +20,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
itemBg
=
null
;
itemBg
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
rect
=
null
;
rect
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
box
=
null
;
box
=
null
;
...
@@ -30,6 +30,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -30,6 +30,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
btn_start
:
cc
.
Node
=
null
;
btn_start
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
btn_restart
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
btn_end
:
cc
.
Node
=
null
;
btn_end
:
cc
.
Node
=
null
;
...
@@ -99,7 +102,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -99,7 +102,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
startPage
()
{
startPage
()
{
this
.
btn_start
.
active
=
false
;
this
.
btn_start
.
active
=
false
;
this
.
cover
.
active
=
false
;
this
.
cover
.
active
=
false
;
this
.
btn_restart
.
active
=
false
;
this
.
boyNode
.
getComponent
(
Boy
).
playRun
(
-
1
);
this
.
boyNode
.
getComponent
(
Boy
).
playRun
(
-
1
);
this
.
boyNode
.
scaleX
=
-
0.5
;
this
.
boyNode
.
scaleX
=
-
0.5
;
...
@@ -109,13 +112,32 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -109,13 +112,32 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initPageView
();
this
.
initPageView
();
}
restartPage
()
{
this
.
btn_start
.
active
=
false
;
this
.
btn_restart
.
active
=
false
;
this
.
cover
.
active
=
false
;
this
.
btn_end
.
active
=
false
;
this
.
dragRoot
.
children
.
forEach
((
val
)
=>
{
val
.
removeAllChildren
();
});
this
.
rect
.
removeAllChildren
();
this
.
boyNode
.
getComponent
(
Boy
).
playtalk
(
-
1
);
this
.
playAudioByUrl
(
this
.
data
.
start_audio_url
,
()
=>
{
this
.
boyNode
.
getComponent
(
Boy
).
playNormal
();
this
.
initPageView
();
})
}
}
initBg
()
{
initBg
()
{
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
bgNode
.
scale
=
this
.
_mapScaleMax
;
bgNode
.
scale
=
this
.
_mapScaleMax
;
cc
.
tween
(
this
.
btn_start
).
to
(
0.3
,
{
scale
:
1.1
}).
to
(
0.2
,
{
scale
:
1
}).
delay
(
1
).
union
().
repeatForever
().
start
();
cc
.
tween
(
this
.
btn_start
).
to
(
0.3
,
{
scale
:
1.1
}).
to
(
0.2
,
{
scale
:
1
}).
delay
(
1
).
union
().
repeatForever
().
start
();
cc
.
tween
(
this
.
btn_restart
).
to
(
0.3
,
{
scale
:
1.1
}).
to
(
0.2
,
{
scale
:
1
}).
delay
(
1
).
union
().
repeatForever
().
start
();
this
.
btn_restart
.
active
=
false
;
this
.
cover
.
active
=
true
;
this
.
cover
.
active
=
true
;
this
.
btn_start
.
on
(
"
click
"
,
this
.
startPage
,
this
)
this
.
btn_start
.
on
(
"
click
"
,
this
.
startPage
,
this
)
this
.
btn_restart
.
on
(
"
click
"
,
this
.
restartPage
,
this
)
this
.
btn_start
.
active
=
false
;
this
.
btn_start
.
active
=
false
;
this
.
btn_end
.
active
=
false
;
this
.
btn_end
.
active
=
false
;
...
@@ -177,7 +199,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -177,7 +199,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc
.
log
(
keyMap
)
cc
.
log
(
keyMap
)
for
(
let
i
=
0
;
i
<
this
.
dragData
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
dragData
.
length
;
++
i
)
{
list
[
i
].
removeAllChildren
();
let
itemInfo
=
this
.
dragData
[
i
];
let
itemInfo
=
this
.
dragData
[
i
];
let
key
=
itemInfo
.
text
let
key
=
itemInfo
.
text
let
dragNode
=
cc
.
instantiate
(
this
.
dragObj
);
let
dragNode
=
cc
.
instantiate
(
this
.
dragObj
);
...
@@ -219,6 +241,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -219,6 +241,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
playAudioByUrl
(
this
.
data
.
end_audio_url
,
()
=>
{
this
.
playAudioByUrl
(
this
.
data
.
end_audio_url
,
()
=>
{
this
.
boyNode
.
getComponent
(
Boy
).
playNormal
();
this
.
boyNode
.
getComponent
(
Boy
).
playNormal
();
this
.
btn_end
.
active
=
true
;
this
.
btn_end
.
active
=
true
;
this
.
btn_restart
.
active
=
true
;
})
})
...
...
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