开发者

my sprite is undeclared?

i declared the sprite in my .h but how do i call the sprite from the node i declared it in so that i don't get the error that it is undeclared.

@int开发者_开发百科erface MyNode : CCNode{
CCSprite *Bsprite1, *Tsprite1, *currentSprite;  
Boolean isChanging;

}
@end

currentSprite = [c1array objectAtIndex:i];
//error 'currentSprite' undeclared.


try separate the CCSprite declarations..

CCSprite* Bsprite1;
CCSprite* Tsprite1;
CCSprite* currentSprite;

I hope your currentSprite = [c1array objectAtIndex:i]; is at your .m..


i got it working had to create a pointer to it MyNode *currentSprite

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜