Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ_lite
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
middleLayer_for_NJ_lite
Commits
c0970d13
Commit
c0970d13
authored
Sep 30, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
4db52ea0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
middleLayerBase.ts
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
+13
-5
No files found.
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
View file @
c0970d13
...
@@ -191,11 +191,14 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -191,11 +191,14 @@ export abstract class middleLayerBase extends cc.Component {
this
.
nodeList
=
[];
this
.
nodeList
=
[];
console
.
log
(
'
汪汪汪: getDragonDisplayAssetList
'
);
console
.
log
(
'
汪汪汪: getDragonDisplayAssetList
'
);
this
.
getDragonDisplayAssetList
(
cc
.
find
(
'
Canvas
'
));
this
.
getDragonDisplayAssetList
(
cc
.
find
(
'
Canvas
'
));
this
.
toCleanParent
();
console
.
log
(
'
喵喵喵1:
'
+
this
.
nodeList
.
length
);
console
.
log
(
'
喵喵喵1:
'
+
this
.
nodeList
.
length
);
console
.
log
(
'
喵喵喵2:
'
+
this
.
atlasList
.
length
);
console
.
log
(
'
喵喵喵2:
'
+
this
.
atlasList
.
length
);
console
.
log
(
'
喵喵喵3:
'
+
this
.
assetList
.
length
);
console
.
log
(
'
喵喵喵3:
'
+
this
.
assetList
.
length
);
console
.
log
(
'
喵喵喵4:
'
+
this
.
textureList
.
length
);
console
.
log
(
'
喵喵喵4:
'
+
this
.
textureList
.
length
);
this
.
loadBundleLock
=
true
;
// 加锁
this
.
loadBundleLock
=
true
;
// 加锁
...
@@ -477,8 +480,8 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -477,8 +480,8 @@ export abstract class middleLayerBase extends cc.Component {
asset
.
destroy
();
asset
.
destroy
();
//
node.active = false;
node
.
active
=
false
;
//
node.removeFromParent();
node
.
removeFromParent
();
texture
.
decRef
();
texture
.
decRef
();
...
@@ -573,8 +576,6 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -573,8 +576,6 @@ export abstract class middleLayerBase extends cc.Component {
textureList
=
null
;
textureList
=
null
;
getDragonDisplayAssetList
(
node
)
{
getDragonDisplayAssetList
(
node
)
{
const
canvas
=
cc
.
find
(
"
Canvas
"
);
const
dragonDisplay
=
node
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
const
dragonDisplay
=
node
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
if
(
dragonDisplay
)
{
if
(
dragonDisplay
)
{
const
atlas
=
dragonDisplay
.
dragonAtlasAsset
;
const
atlas
=
dragonDisplay
.
dragonAtlasAsset
;
...
@@ -596,7 +597,6 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -596,7 +597,6 @@ export abstract class middleLayerBase extends cc.Component {
this
.
assetList
.
push
(
asset
);
this
.
assetList
.
push
(
asset
);
this
.
textureList
.
push
(
atlas
.
texture
);
this
.
textureList
.
push
(
atlas
.
texture
);
node
.
parent
=
canvas
;
// this.assetObj[uuid] = true;
// this.assetObj[uuid] = true;
console
.
log
(
'
汪汪汪: atlas.texture.nativeUrl =
'
+
atlas
.
texture
.
nativeUrl
);
console
.
log
(
'
汪汪汪: atlas.texture.nativeUrl =
'
+
atlas
.
texture
.
nativeUrl
);
...
@@ -610,4 +610,12 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -610,4 +610,12 @@ export abstract class middleLayerBase extends cc.Component {
});
});
}
}
toCleanParent
()
{
const
canvas
=
cc
.
find
(
"
Canvas
"
);
this
.
nodeList
.
forEach
(
node
=>
{
node
.
parent
=
canvas
;
});
}
}
}
\ No newline at end of file
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