Friday, 27 September 2013

PRFilledPolygon - Opacity/Color with Cocos2d in Objective-C

PRFilledPolygon - Opacity/Color with Cocos2d in Objective-C

i have a question about PRFilledPolygon from PrKit which you can found
here:
https://github.com/Panajev/PRKit/blob/master-v2/PRKit/PRFilledPolygon.m
My concern is to runAction with CCFadeout or CCFadein with this class.
This class inherits from CCNode which have no methods like setColor or
setOpacity. But to run this actions which i named above require a methode
setOpacity to make the texture transparent.
So my first step was to in change "CCNode" to "CCNodeRGBA". I have no idea
what my next step is. I have read out in other forums and found this
article:
http://www.cocos2d-iphone.org/forums/topic/prfilledpolygon-opacitycolor/
But this doesn't work.
second found article here:
http://insights.empatika.com/blog/2013/04/06/hackathon-ios-game-in-7-days/
So i play a bit in the draw method but my texture won't be transparent.
Has anybody used PRFilledPolygon and has the same problem like me?
Hope anyone understand me.
Greetings Alex

No comments:

Post a Comment