Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. -(void) setOpacity:(GLubyte) anOpacity
  2. {
  3. opacity_ = anOpacity;
  4.  
  5. // special opacity for premultiplied textures
  6. if( opacityModifyRGB_ )
  7. [self setColor: colorUnmodified_];
  8.  
  9. [self updateColor];
  10.  
  11. for (id<CCRGBAProtocol> child in children ) {
  12. // You should check if child responds to selector or conforms to CCRGBAProtocol.
  13. [child setOpacity:opacity];
  14. }
  15. }
  16.  
  17. - (void) setOpacity:(GLubyte)opacity
  18. {
  19. [super setOpacity:opacity];
  20. for(id<CCRGBAProtocol> child in children) {
  21. [child setOpacity:opacity];
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement