Thanks a lot for reading!
- (zero) ccTouchesEnded: (NSSet *) touches with the event: (UIEvent *) event {UITouch * Touch = [touchs an object]; CGPoint Location = [[CCDCDShareShare Director] ConvertTOGL: [Touch on Location: Touch. See]]; CRGRAARAct = CGRactMake (100, 120, 75, 113); Int tjx = sprite.position.x; If (CGRectContainsPoint (myRect, Location)) {tjx ++; }}
For some reason, ccTouchesEnded
is not allowing me to use my "phantom" I also use CGRectMake
Tried to use:
cgkkmk (sprite.position.x, sprite.position.y, sprite.contentSize.Width, sprite.contentSize height)
But I could not reach the position or height of my sprites. When I declare in init method, "phantom" keeps getting undeclared, and the child is added.
Please help !! I'm sure that something is really simple to me.
One solution must be to give a tag to the phantom:
sprite.tag = 123; // Any arbitrary number to identify this sprite
Later you can use it using that phantom:
CCSprite * sprite = [Self getChildByTag: 123];
It is similar to removing a child by tag:
Comments
Post a Comment