i am trying to understand somthing strange. i wanted to call from regular class to cocos2d class. the cocos2d class name is HelloWorldScene , but when i call it , i was told use only HelloWorld , without the scene like this :
HelloWorld *ran=[[HelloWorld alloc] init];
[ran HardwareEvent:DollPart];
why not scene ?? whats happen is that the cocos class is been called, and also the init is being called, and if i am trying to play animation it doesnt played.(but being called)
I HAVE to say that the cocos class is the first one being called when the app begins, and later other regular class is interrupt it 开发者_运维百科again by the code i wrote here.
so whats wrong ? how can i interrupt a class that is already in use, by another class ? why animation is not working? is it somthing to do with layers ?
thanks a lot !
Yeah that's not the way the Cocos2D libraries work. If you are as new to Cocos2D as it seems you are then I recommend:
Ray Wenderlich.com (tutorials for Cocos2D and other iOS subjects)
HelloWorldScene should be the scene that runs by default with a new template Cocos2D project. If you want to call a method in the HelloWorldLayer class you just call [self methodName];
精彩评论