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
18148b3d
Commit
18148b3d
authored
Sep 29, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
ecb3e380
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
22 deletions
+26
-22
middleLayerBase.ts
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
+26
-22
No files found.
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
View file @
18148b3d
...
@@ -184,17 +184,17 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -184,17 +184,17 @@ export abstract class middleLayerBase extends cc.Component {
// return;
// return;
// }
// }
//
this.assetList = [];
this
.
assetList
=
[];
//
this.textureList = [];
this
.
textureList
=
[];
//
this.assetObj = {};
this
.
assetObj
=
{};
//
this.atlasList = [];
this
.
atlasList
=
[];
//
this.nodeList = [];
this
.
nodeList
=
[];
//
console.log('汪汪汪: getDragonDisplayAssetList');
console
.
log
(
'
汪汪汪: getDragonDisplayAssetList
'
);
//
this.getDragonDisplayAssetList(cc.find('Canvas'));
this
.
getDragonDisplayAssetList
(
cc
.
find
(
'
Canvas
'
));
//
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
);
...
@@ -237,11 +237,11 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -237,11 +237,11 @@ export abstract class middleLayerBase extends cc.Component {
middleLayer
.
scale
=
canvas
.
width
/
middleLayer
.
width
;
middleLayer
.
scale
=
canvas
.
width
/
middleLayer
.
width
;
//
const destroyer = cc.instantiate(cc.find('middleLayer/Destroyer'));
const
destroyer
=
cc
.
instantiate
(
cc
.
find
(
'
middleLayer/Destroyer
'
));
//
//
if (destroyer) {
// if (destroyer) {
//
destroyer.parent = cc.find('Canvas');
destroyer
.
parent
=
cc
.
find
(
'
Canvas
'
);
//
destroyer.active = true;
destroyer
.
active
=
true
;
//
//
}
// }
...
@@ -421,7 +421,7 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -421,7 +421,7 @@ export abstract class middleLayerBase extends cc.Component {
async
clearDragonDisplayAssetList
3
()
{
async
clearDragonDisplayAssetList
()
{
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵:
'
+
this
.
nodeList
.
length
);
console
.
log
(
'
喵喵喵:
'
+
this
.
nodeList
.
length
);
...
@@ -450,8 +450,11 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -450,8 +450,11 @@ export abstract class middleLayerBase extends cc.Component {
// node.removeFromParent();
// node.removeFromParent();
});
});
await
asyncDelay
(
0.001
);
console
.
log
(
"
this.atlasList.length 1:
"
,
this
.
atlasList
.
length
);
// await asyncDelay(0.001);
console
.
log
(
"
this.atlasList.length:
"
,
this
.
atlasList
.
length
);
for
(
let
i
=
0
;
i
<
this
.
atlasList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
atlasList
.
length
;
i
++
)
{
const
atlas
=
this
.
atlasList
[
i
];
const
atlas
=
this
.
atlasList
[
i
];
const
asset
=
this
.
assetList
[
i
];
const
asset
=
this
.
assetList
[
i
];
...
@@ -471,7 +474,9 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -471,7 +474,9 @@ export abstract class middleLayerBase extends cc.Component {
texture
.
decRef
();
texture
.
decRef
();
await
asyncDelay
(
0.001
);
console
.
log
(
'
aaaaa~
'
);
// await asyncDelay(0.001);
}
}
...
@@ -499,8 +504,7 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -499,8 +504,7 @@ export abstract class middleLayerBase extends cc.Component {
}
}
// 原始方法
// 原始方法
clearDragonDisplayAssetList2
()
{
clearDragonDisplayAssetList3
()
{
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵:
'
+
this
.
nodeList
.
length
);
console
.
log
(
'
喵喵喵:
'
+
this
.
nodeList
.
length
);
...
@@ -525,7 +529,7 @@ export abstract class middleLayerBase extends cc.Component {
...
@@ -525,7 +529,7 @@ export abstract class middleLayerBase extends cc.Component {
}
}
clearDragonDisplayAssetList
()
{
clearDragonDisplayAssetList
2
()
{
return
;
return
;
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
...
...
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