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
de075337
Commit
de075337
authored
Sep 26, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug 清缓存
parent
b948676e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
31 deletions
+8
-31
middleLayerBase.ts
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
+8
-31
No files found.
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
View file @
de075337
...
@@ -194,6 +194,7 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -194,6 +194,7 @@ export abstract class middleLayerBase extends cc.Component {
console
.
log
(
'
喵喵喵4:
'
+
this
.
textureList
.
length
);
console
.
log
(
'
喵喵喵4:
'
+
this
.
textureList
.
length
);
this
.
loadBundleLock
=
true
;
// 加锁
this
.
loadBundleLock
=
true
;
// 加锁
this
.
currentBundleInfo
=
{
sceneName
,
version
,
bondleUrl
};
this
.
currentBundleInfo
=
{
sceneName
,
version
,
bondleUrl
};
console
.
log
(
"
[middleLayer_for_NJ_lite]-[loadBundle] currentBundleInfo=
"
,
JSON
.
stringify
(
this
.
currentBundleInfo
))
console
.
log
(
"
[middleLayer_for_NJ_lite]-[loadBundle] currentBundleInfo=
"
,
JSON
.
stringify
(
this
.
currentBundleInfo
))
...
@@ -410,7 +411,6 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -410,7 +411,6 @@ export abstract class middleLayerBase extends cc.Component {
clearDragonDisplayAssetList
()
{
clearDragonDisplayAssetList
()
{
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵:
'
+
this
.
nodeList
.
length
);
console
.
log
(
'
喵喵喵:
'
+
this
.
nodeList
.
length
);
...
@@ -418,41 +418,20 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -418,41 +418,20 @@ export abstract class middleLayerBase extends cc.Component {
console
.
log
(
'
喵喵喵:
'
+
this
.
assetList
.
length
);
console
.
log
(
'
喵喵喵:
'
+
this
.
assetList
.
length
);
console
.
log
(
'
喵喵喵:
'
+
this
.
textureList
.
length
);
console
.
log
(
'
喵喵喵:
'
+
this
.
textureList
.
length
);
[...
this
.
atlasList
,
...
this
.
assetList
].
forEach
(
asset
=>
{
asset
.
decRef
();
cc
.
assetManager
.
releaseAsset
(
asset
);
this
.
textureList
.
forEach
(
texture
=>
{
while
(
texture
?.
refCount
)
{
texture
?.
decRef
();
}
});
[...
this
.
atlasList
].
forEach
(
asset
=>
{
asset
.
destroy
();
asset
.
destroy
();
while
(
asset
?.
refCount
)
{
asset
?.
decRef
();
}
// cc.assetManager.releaseAsset(asset);
});
});
[...
this
.
assetList
].
forEach
(
asset
=>
{
asset
.
destroy
();
while
(
asset
?.
refCount
)
{
asset
?.
decRef
();
}
// cc.assetManager.releaseAsset(asset);
});
this
.
nodeList
.
forEach
(
node
=>
{
this
.
nodeList
.
forEach
(
node
=>
{
node
.
active
=
false
;
node
.
active
=
false
;
node
.
removeFromParent
();
node
.
removeFromParent
();
});
});
this
.
textureList
.
forEach
(
texture
=>
{
texture
.
decRef
();
});
}
}
nodeList
=
null
;
nodeList
=
null
;
...
@@ -460,14 +439,12 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -460,14 +439,12 @@ export abstract class middleLayerBase extends cc.Component {
assetList
=
null
;
assetList
=
null
;
textureList
=
null
;
textureList
=
null
;
getDragonDisplayAssetList
(
node
)
{
getDragonDisplayAssetList
(
node
)
{
const
dragonDisplay
=
node
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
const
dragonDisplay
=
node
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
if
(
dragonDisplay
)
{
if
(
dragonDisplay
)
{
const
atlas
=
dragonDisplay
.
dragonAtlasAsset
;
const
atlas
=
dragonDisplay
.
dragonAtlasAsset
;
const
asset
=
dragonDisplay
.
dragonAsset
;
const
asset
=
dragonDisplay
.
dragonAsset
;
if
(
atlas
&&
atlas
.
texture
)
{
if
(
atlas
.
texture
)
{
if
(
atlas
.
texture
.
nativeUrl
.
includes
(
'
h5template
'
))
{
if
(
atlas
.
texture
.
nativeUrl
.
includes
(
'
h5template
'
))
{
node
.
children
.
forEach
(
child
=>
{
node
.
children
.
forEach
(
child
=>
{
this
.
getDragonDisplayAssetList
(
child
);
this
.
getDragonDisplayAssetList
(
child
);
...
...
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