ZhouWeikuan / cocos2d

cocos2d for android, based on cocos2d-android-0.82, and now ported from cocos2d-iphone 0.99.4. The googlecode address is here: http://code.google.com/p/cocos2d-android-1/ . There are several demos to watch.
610 stars 291 forks source link

Android equivalent of Cocos2D-iOS CCNode.visit() in Cocos2D-Android? #52

Closed agGitHub closed 12 years ago

agGitHub commented 12 years ago

Hi,

I have got the following code in my iOS Coco2D game:

CCSprite *mysprite = [CCSprite spriteWithFile:@"mypng.png"]; // ...Some code here... // [mysprite visit];

In Coco2D Android, I write:

CCSprite mysprite = CCSprite.sprite("mypng.png"); // ...Some code here... // mysprite.visit(*_GL10 PARAMETER EXPECTED HERE_**);

What should I write as parameter in the visit method ??

Thanks !!

shashachu commented 12 years ago

The director has a static reference to the GL10 object:

CCDirector.gl

agGitHub commented 12 years ago

Thanks it works !