Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_09
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
JJ_Game_09
Commits
17b6b836
Commit
17b6b836
authored
Dec 25, 2023
by
david
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-add-log' into 'master'
fix: 修改log 日志输出方式 See merge request
!2
parents
8f2fe321
fd758e3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
JJ_Game_09.ts
assets/JJ_Game_09/scene/JJ_Game_09.ts
+11
-1
JJ_Game_09_MyCocosSceneComponent.ts
assets/JJ_Game_09/script/JJ_Game_09_MyCocosSceneComponent.ts
+3
-3
No files found.
assets/JJ_Game_09/scene/JJ_Game_09.ts
View file @
17b6b836
...
@@ -93,7 +93,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -93,7 +93,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
page
:
number
;
private
page
:
number
;
initData
()
{
initData
()
{
console
.
log
(
"
initData
"
,
this
.
data
)
this
.
log
(
`initData:
${
JSON
.
stringify
(
this
.
data
)}
`
)
this
.
autoPlay
=
0
;
this
.
autoPlay
=
0
;
this
.
page
=
0
;
this
.
page
=
0
;
Game
.
getIns
().
init
(
this
.
data
);
Game
.
getIns
().
init
(
this
.
data
);
...
@@ -463,4 +463,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -463,4 +463,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
})
})
}
}
log
(
str
)
{
const
node
=
cc
.
find
(
'
middleLayer
'
);
if
(
node
){
node
.
getComponent
(
'
middleLayer
'
).
log
(
str
);
}
else
{
console
.
log
(
str
);
}
}
}
}
assets/JJ_Game_09/script/JJ_Game_09_MyCocosSceneComponent.ts
View file @
17b6b836
...
@@ -52,11 +52,11 @@ export class MyCocosSceneComponent extends cc.Component {
...
@@ -52,11 +52,11 @@ export class MyCocosSceneComponent extends cc.Component {
// 生命周期 start
// 生命周期 start
start
()
{
start
()
{
console
.
log
(
'
int_courseware
'
,(
<
any
>
window
).
courseware
);
this
.
log
(
`int_courseware:
${
JSON
.
stringify
((
<
any
>
window
).
courseware
)}
`
);
if
(
window
&&
(
<
any
>
window
).
courseware
&&
(
<
any
>
window
).
courseware
.
getData
)
{
if
(
window
&&
(
<
any
>
window
).
courseware
&&
(
<
any
>
window
).
courseware
.
getData
)
{
(
<
any
>
window
).
courseware
.
getData
((
data
)
=>
{
(
<
any
>
window
).
courseware
.
getData
((
data
)
=>
{
this
.
log
(
'
data:
'
+
data
);
this
.
log
(
'
template-data:
'
+
JSON
.
stringify
(
data
)
);
this
.
data
=
data
||
this
.
getDefaultData
();
this
.
data
=
data
||
this
.
getDefaultData
();
this
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
));
this
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
));
this
.
preloadItem
();
this
.
preloadItem
();
...
@@ -89,7 +89,7 @@ export class MyCocosSceneComponent extends cc.Component {
...
@@ -89,7 +89,7 @@ export class MyCocosSceneComponent extends cc.Component {
preload
()
{
preload
()
{
const
preloadArr
=
this
.
_imageResList
.
concat
(
this
.
_audioResList
).
concat
(
this
.
_animaResList
);
const
preloadArr
=
this
.
_imageResList
.
concat
(
this
.
_audioResList
).
concat
(
this
.
_animaResList
);
console
.
log
(
'
reload data
'
,
preloadArr
)
this
.
log
(
`reload data:
${
JSON
.
stringify
(
preloadArr
)}
`
)
cc
.
assetManager
.
loadAny
(
preloadArr
,
null
,
null
,
(
err
,
data
)
=>
{
cc
.
assetManager
.
loadAny
(
preloadArr
,
null
,
null
,
(
err
,
data
)
=>
{
// if (window && window["air"]) {
// if (window && window["air"]) {
// // window["air"].onCourseInScreen = (next) => {
// // window["air"].onCourseInScreen = (next) => {
...
...
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