sprite kit - Porting iOS Spritekit to Android, what is animateWithTexture equivalent? -
i've created new cocos2d project android try , port across ios spritekit 2d game android , can't seem figure out how animate in android cocos2d?
my code in ios want port follows:
sktexture* crowtexture1 = [sktexture texturewithimagenamed:@"crow1"]; sktexture* crowtexture2 = [sktexture texturewithimagenamed:@"crow2"]; skaction* flap = [skaction repeatactionforever:[skaction animatewithtextures:@[crowtexture1,crowtexture2] timeperframe:0.5]]; [crow runaction:flap];
my cocos2d java code follows, far:
cgsize winsize = ccdirector.shareddirector().displaysize(); ccsprite player = ccsprite.sprite("crow1.png"); player.setposition(cgpoint.ccp(player.getcontentsize().width / 2.0f, winsize.height / 2.0f)); addchild(player);
any ideas?
Comments
Post a Comment