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…
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…
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…
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"…
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)…
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…
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…
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 =…
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…
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…
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…
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.
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…
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 (…
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…