Questions tagged [ccsprite]

CCSprite is a 2D image that is integrated into a larger scene in cocos2d, which normally represents a character or object in a cocos2d game.

CCSprite is a class inheriting from CCNode, which normally represents characters or objects displayed in the cocos2d games.

In computer graphics, a sprite is a two-dimensional image or animation that is integrated into a larger scene. A cocos2d' CCSprite is like any other computer sprite. It is a 2D image that can be moved, rotated, scaled, animated, etc.

  • CCSprite can be created with an image, or with a sub-rectangle of an image.

  • CCSprites can have other sprites as children. When a parent is transformed, all its children are transformed as well.

  • Since CCSprite is subclass of CCNode, they can be transformed manually or by using CCActions.

You can find the details about sprites on Wikipedia.

The CCSprite class reference is given at: http://www.cocos2d-iphone.org/api-ref/latest-stable/interface_c_c_sprite.html

424 questions
-1
votes
2 answers

How to detect collision of sprite in cocos2d

i want to detect collision of a sprite with another sprite. but i want to check whether the sprite is touched with left part of other sprite or touched with right part of sprite. i am using below code for detecting collision. but this detect the…
KsK
  • 675
  • 1
  • 10
  • 22
-1
votes
1 answer

How do I make Enemy sprites spawn in cocos2d at Random

i have been looking around the Internet to find out how to spawn Enemy Sprites at rondom, in a random place, I'm making a game that involves a sprite jumping an it has to dodge these 'Enemy' sprites or objects blocking it's path. If anybody has any…
user2501236
  • 11
  • 1
  • 2
-2
votes
1 answer

Cocos2d Joystick

I have been looking all over for help on how to make a CCSprite move and rotate with the movement of a virtual joystick. I have tried examples and sample code, but, none have worked for me. If someone could tell me how to implement a joystick into…
-2
votes
1 answer

Moving sprite from a group of sprites

I am having 15 sprites in my layer.i added these sprite to mutable array i want to move single sprite using ccTouchesMoved.when the touch ended ccTouchesEnded sprite move back to its starting point or its origin. My coding: if( (self=[super init]))…
Krishnan8190
  • 320
  • 2
  • 8
1 2 3
28
29