Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scilla-components
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
劳工
scilla-components
Commits
1738e611
Commit
1738e611
authored
Mar 18, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复锚点没对子集生效的问题
parent
79e4440c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Transform.ts
src/base/Transform.ts
+4
-1
No files found.
src/base/Transform.ts
View file @
1738e611
...
@@ -63,6 +63,9 @@ export default class Transform extends ScillaComponent {
...
@@ -63,6 +63,9 @@ export default class Transform extends ScillaComponent {
*/
*/
@
dirtyFieldTrigger
@
dirtyFieldTrigger
pivot
:
Vector2D
=
new
Vector2D
(
0.5
,
0.5
);
pivot
:
Vector2D
=
new
Vector2D
(
0.5
,
0.5
);
/**
* 旋转
*/
@
dirtyFieldDetector
@
dirtyFieldDetector
rotation
=
0
;
rotation
=
0
;
...
@@ -179,7 +182,7 @@ export default class Transform extends ScillaComponent {
...
@@ -179,7 +182,7 @@ export default class Transform extends ScillaComponent {
const
parentTransform
:
Transform
=
entity
.
parent
.
getComponent
(
Transform
);
const
parentTransform
:
Transform
=
entity
.
parent
.
getComponent
(
Transform
);
if
(
parentTransform
)
{
if
(
parentTransform
)
{
this
.
_renderAlpha
=
parentTransform
.
_renderAlpha
*
this
.
alpha
;
this
.
_renderAlpha
=
parentTransform
.
_renderAlpha
*
this
.
alpha
;
_globalMatrix
.
concat
(
parentTransform
.
getMatrix
());
_globalMatrix
.
concat
(
parentTransform
.
getMatrix
(
true
));
}
}
}
else
{
}
else
{
this
.
_renderAlpha
=
this
.
alpha
;
this
.
_renderAlpha
=
this
.
alpha
;
...
...
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