ccsprite
How to simulate gravity for CCSprite?
Currently I am using UIKit in my app but I decided to make the switch to Cocos2D, right now I am trying to implement gravity but I am having trouble doing so. I have googled this and have not found mu[详细]
2023-04-11 13:24 分类:问答how to do a function for a sprite or menu in cocos2d?
I created two CCLayers, one is gamelayer, another is howlayer. The code of gamelayer.m is -(id)init{ if (self = [super init]) {[详细]
2023-04-08 08:19 分类:问答how to draw many CCSprite without slow performance?
I\'m making such a arrow shooting game. Everything is good. but I realized if I draw linetracking my arrow, It will be great. so I put some code on my game in my Scheduler that is supposed to draw cir[详细]
2023-04-05 06:25 分类:问答Can I layer a CCSprite between two CCTMXLayers?
I am making a top-down shooter that makes extensive use of TMX maps created with the \"Tiled\" application.Within my TMX map, I have a \"Background\" layer with floor tiles, which appears beneath my c[详细]
2023-04-04 05:05 分类:问答Cocos2d show only a part of a CCSprite
Is there any possibility to show o开发者_JS百科nly a part of an CCSprite? It seams that contentSize property doesn\'t have a good result.I think you might have to create a new sprite for this. The ge[详细]
2023-04-03 01:47 分类:问答Cocos2d: CCSprite initWithFile in CCSprite subclass crashes
I have cocos2d project with custom CCSprite subclass: MyCustomSprite.h: #import \"cocos2d.h\" @interface MyCustomSprite : CCSprite[详细]
2023-04-02 09:30 分类:问答cocos2d sprites disable touches
i haves game with cocos2d i have many sprites i\'m using touch to sprite with this CGRectContainsPoint([[gameImages objectAtIndex:i] boundingBox], location)[详细]
2023-03-28 19:44 分类:问答convertToNodeSpace not working properly
Using this code (tweaked a little) i can\'t get a constant Y value. it keeps changing. X works perfect but Y is really skewed.[详细]
2023-03-28 06:29 分类:问答CCsprite anchor point problem
I have some problem with Anchor point.. i have a sprite and i need to calculate the anchor point for this sprite around the screen center.[详细]
2023-03-28 00:24 分类:问答Moving a "falling" CCSprite according to acceleration
I am using this code to move a \"falling\" sprite according to the acceleration of the UIDevice. It works nice, but is very laggy, meaning that there are jumps between the positions of the sprite.[详细]
2023-03-27 11:35 分类:问答