Questions tagged [cclayer]

CCLayer is a class from the popular Cocos2d engine

CCLayer is a class from the popular Cocos2d engine.

Complete API Reference.

115 questions
0
votes
2 answers

Cocos2D CCMenuItem over an other CCLayer doesn't respond

Here is my problem. I got a classic CCLayer subclass. In the init method, I create a CCMenuItem, and add it to my main layer : CCMenuItemFont *back = [CCMenuItemFont itemFromString:@"back" target:self selector:@selector(back)]; [back…
Bob
  • 1
0
votes
2 answers

Draw a line by using CAlayer in image in iphone

I am editing my question... what should i do if i want to draw a line in image by using CALAyer. i want to draw a line inside the circle(circular image). Example:- One point of the line will be the radius of the line and the other should be the end…
ios developer
  • 3,363
  • 3
  • 51
  • 111
0
votes
1 answer

Using a CCLayer as a progress bar

How does one display a CCLayer in cocos2d but making it appear as a progress bar in the sense that the layer should appear from the left and extend to the right until it is fully shown? Can this be done using a series of images and setting the…
user773578
  • 1,161
  • 2
  • 13
  • 24
0
votes
1 answer

Cocos2d: Perspective effect with mutli-layers

I want to use in my game effect of perspective view by using few layers, scrolling with different speed. I have three layers. My background is bottom layer, it scrolls very slowly, so it can be in a few times smaller than level. My "semi-background"…
0
votes
1 answer

How do I recognize ccTouches events when my ccLayer has loadNibNamed

My problem is that I didn't find a solution to "pierce" through a UIScrollView so the ccLayer could recognize the ccTouch events self.isTouchEnabled = YES; [[NSBundle mainBundle] loadNibNamed:@"myLayer" owner:self options:nil]; ... - (void)…
Gilad Shai
  • 33
  • 2
  • 5
0
votes
1 answer

curve in tabbar view and bottom popup not working?

Hello all, I tried to add arc for UIBezierPath I could not able to get the exact curve, here is my code here I have added the bezier path for the added curve from the center position. @IBDesignable class MyTabBar: UITabBar { private var…
Manikandan S
  • 115
  • 3
  • 18
0
votes
2 answers

CCSprite not animated anymore as finger does not move on top UIView

Here is the problem: I'm working with cocos2D and CCLayers, and I use a UIView to catch movements with a Gesture recognizer for a UIScrollMenu. On my layer, there are animated sprites that run an animation forever; when I drag the scrollMenu with…
Grhyll
  • 83
  • 1
  • 6
0
votes
1 answer

Cocos2d Displaying a Layer Issue

I'm trying to display a pause game layer from the applicationDidEnterBackground: method and for some reason it does call the method but nothing happens. Delegate - (void)applicationDidEnterBackground:(UIApplication*)application { ship =…
jkigel
  • 1,592
  • 6
  • 28
  • 49
0
votes
1 answer

Why does a fullscreen transparent button drop fps from 60 to 30 on cocos2d-iphone and how do I work around it?

I have a cclayer class with invisible button that is the size of the iphone 320x480 screen. I've set it to have the visible property so that when the user taps on any part of the screen, it'll set itself to invisible and set the rest of my…
Azeworai
  • 772
  • 3
  • 9
  • 25
0
votes
1 answer

IPhone-Cocos2d: How to make a CCLayer that reflects another CCLayer

how can i create a new layer, that represents another layer i already have on the screen, just in a different position&scale? Imagin it something like a minimap, that represents the current map the player is in, just that it is smaller, and appears…
Alon Amir
  • 4,913
  • 9
  • 47
  • 86
0
votes
0 answers

CCScrollview not working

I am using Sprite Builder and created a scrollview to create selection of players list in stripe which can be scrolled horizontally. PlayerListContainer.ccb:Scrollview Container Taken a scroll view of width: 300, height: 320 with Horizontal…
Paresh Thakor
  • 1,795
  • 2
  • 27
  • 47
0
votes
1 answer

CCLayerGradient tint to

How can I use CCTintTo with CCLayerGradient? When I use default CCTintTo action on gradient layer only one color changing, but another color still the same. How can I change them all together? Any help. Thanks.
flowmachine1
  • 111
  • 2
  • 7
0
votes
1 answer

CCLayer scaling and touch implementation?

I've made a CCLayer that holds CCSprite and two CCLabelBMFont's. My goal is to create a customized "button" which will scale down when pressed. I've ran into problems with touch and scaling of this layer. First is the touch, I can't touch the layer…
hedeic
  • 41
  • 6
0
votes
2 answers

CCLayer setTouchPriority has no effect

I created a Layer, which has a sole purpose to block ("swallow") touches, and this feature can be turned on and off. The class is very basic, if it receives the touch it always swallows it: bool BlockingLayer::init(){ // Super init. if (…
SPQR3
  • 647
  • 7
  • 20
0
votes
0 answers

Combining two CCSprites to make one CCSprite

Is it possible to have CCSprite * sprite1 and CCSprite * sprite 2 combined? For example if you took a piece of white paper (sprite1) and glued a red piece of paper with a cut out, reassembling transparent areas, (sprite2) on top of the white paper…
stenger96
  • 224
  • 3
  • 17