Skip to content

Commit 7efa0ea

Browse files
committed
Cascade for colour and opacity now cascades all children, regardless of their cascade settings
Former-commit-id: d8b831c
1 parent 3c46506 commit 7efa0ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cocos2d/CCNode.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,11 +1580,11 @@ - (void)updateDisplayedColor:(ccColor4F) parentColor
15801580
_displayColor.g = _color.g * parentColor.g;
15811581
_displayColor.b = _color.b * parentColor.b;
15821582

1583-
if (_cascadeColorEnabled) {
1583+
// if (_cascadeColorEnabled) {
15841584
for (CCNode* item in _children) {
15851585
[item updateDisplayedColor:_displayColor];
15861586
}
1587-
}
1587+
// }
15881588
}
15891589

15901590
- (void) cascadeOpacityIfNeeded
@@ -1601,11 +1601,11 @@ - (void)updateDisplayedOpacity:(CGFloat)parentOpacity
16011601
{
16021602
_displayColor.a = _color.a * parentOpacity;
16031603

1604-
if (_cascadeOpacityEnabled) {
1604+
// if (_cascadeOpacityEnabled) {
16051605
for (CCNode* item in _children) {
16061606
[item updateDisplayedOpacity:_displayColor.a];
16071607
}
1608-
}
1608+
// }
16091609
}
16101610

16111611
-(void) setOpacityModifyRGB:(BOOL)boolean{

0 commit comments

Comments
 (0)