Is it possible to to re-initialize an object in cocos2d -


I have a sprite pest child. I have made an example of that class in GameLayer and then start it with it using

Insect * bgg = [Insect spriteWithFile: @ "bird2a. Gif "];

Then I set a timer (10 seconds)

* bgg = [Insect refrigerated file: @ "2.gif"];

But my program crashes. Now my question is possible

I have another question, when I

- (BOOL) CCT UsageBaggan: (NSAT *) is used with the event: (UIEvent *) Event
{
UITouch * touch = [touches anyObject]
CG point point 2 = [Touch space Iniview: [Touch View]]

  CGP Cpoint = [[Directors Share Director] Convert Condanet: point 2]; NSLog (@ "started in contact");  


} In my pest class it can detect the touch on the 'bgg' object declared in the GameLayer. But when I used this function in GameLayer

Advanced thanx for your answer

Your program crashes because you have a typo '*' with '* bgg' Remove it means that you are defending the pointer, then you are trying to make the redirected indicator a new object. You just want

bgg = [Insect spriteWithFile: @ "2.gif"];

However, to make this just a completely new phantom, overkill replace the image with a subclass of a phantom textureNode So, to give a different image to the sprayite, simply use TextureNode's Texture property.

Texture 2D * New Image = [[Texturemgr Shared Shared Mix] addImage: @ "2.gif"]; Bgg.texture = newImage;


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -