Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
svge-egret
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
王剑峰
svge-egret
Commits
6f3c8807
Commit
6f3c8807
authored
Oct 14, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
fe3b6f64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
MovieClip.js
src/Egret/MovieClip.js
+3
-4
No files found.
src/Egret/MovieClip.js
View file @
6f3c8807
...
@@ -184,7 +184,8 @@ export class MovieClip extends egret.DisplayObjectContainer {
...
@@ -184,7 +184,8 @@ export class MovieClip extends egret.DisplayObjectContainer {
// child.x = 0;
// child.x = 0;
// child.y = 0;
// child.y = 0;
this
.
addChild
(
child
)
this
.
addChild
(
child
)
//记录下
child
[
"imageKey"
]
=
ele
.
imageKey
;
}
}
}
}
// console.log(this)
// console.log(this)
...
@@ -201,12 +202,10 @@ export class MovieClip extends egret.DisplayObjectContainer {
...
@@ -201,12 +202,10 @@ export class MovieClip extends egret.DisplayObjectContainer {
var
width
=
texture
.
textureWidth
;
var
width
=
texture
.
textureWidth
;
var
height
=
texture
.
textureHeight
;
var
height
=
texture
.
textureHeight
;
getAsset
(
imageUrl
,
function
(
tex
,
key
)
{
getAsset
(
imageUrl
,
function
(
tex
,
key
)
{
//替换掉this.textures[imagekey]
this
.
textures
[
imagekey
]
=
tex
;
for
(
var
i
=
0
;
i
<
this
.
children
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
children
.
length
;
i
++
)
{
let
child
=
this
.
children
[
i
]
let
child
=
this
.
children
[
i
]
//texture相等
//texture相等
if
(
child
.
texture
==
texture
)
child
.
texture
=
tex
if
(
child
.
imagekey
==
imagekey
)
child
.
texture
=
tex
}
}
},
this
)
},
this
)
}
}
...
...
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