How to get the location (x,y) of a CCLabel that is a child of a CCScene?
Posted
by RexOnRoids
on Stack Overflow
See other posts from Stack Overflow
or by RexOnRoids
Published on 2010-05-09T15:33:54Z
Indexed on
2010/05/09
15:38 UTC
Read the original article
Hit count: 176
(learning Cocos2D)
After creating a CCLabel and adding it to a CCLayer like this:
//From HelloWorldScene.m
// create and initialize a Label
CCLabel* label1 = [CCLabel labelWithString:@"Hello" fontName:@"Marker Felt" fontSize:10];
label1.position = ccp(35, 435);
// add the label as a child to this Layer
[self addChild: label1];
How do I determine when a user has TOUCHED the label on the screen?
© Stack Overflow or respective owner