Hello, I'm a noob and I want to know the difference between:
1- AtlasNode
2- AtlasSprite
3- BitmapFontAtlas
4- CocosNodeTexture
5- Texture2D
6- TextureNode
7-TextureAtlas
8- TextureMgr
and when and with what to use.
and how to handle touches!!! thank you
Explanation needed!
(9 posts) (4 voices)-
Posted 2 years ago #
-
And how to make my game ?
This is difficult to answer such a question. Usually when a question starts with "What is the difference..." there are only 2 things to compare, but you provide 8 of them.
Did you have a look a t the examples provided with the framework before posting your question ?Posted 2 years ago # -
Ok let's start with atlassprite and texture2d
and i want just an explanation it's ok if you can't mention the differences
Posted 2 years ago # -
hi iphoneDev.
If you search around you may notice this has been discussed and explained a lot of times :)searching "atlassprite":
http://www.cocos2d-iphone.org/forum/topic/264#post-1415
http://www.cocos2d-iphone.org/forum/topic/1498#post-9185searching "touches"
http://www.cocos2d-iphone.org/forum/topic/767#post-4524
Also look at touchesTest.And for MOST stuff the examples that come with cocos2d should suffice.
Good luck!
Posted 2 years ago # -
You can view descriptions about the classes in the documentation:
http://www.cocos2d-iphone.org/api-ref/latest-stable/annotated.htmlBasically Texture2D is just an OpenGL texture whereas AtlasSprite is a CocosNode that has a texture, position, and more to help manage a sprite in a game. You almost never need to use a Texture2D.
Posted 2 years ago # -
ok thanks alot for the links ...idid see the touchestest example but i am still having some problems handling touches...
i am trying to make a flying bird then you must touch it to kill it..
so what i did is to make a Bird class which inherit from AtlasSprite
then i want to hit the bird...
the code
http://sunsu.pastebin.com/m12094aadPosted 2 years ago # -
and if any one can help me how to make several birds after the killing a one that would be great....
Posted 2 years ago # -
i have already take a look at this post http://juanmunozar.blogspot.com/2009/02/cocos2d-iphone-dynamically-touch.html but do i have to do this and what else can i use...
Posted 2 years ago # -
ok finally i've managed to touch the bird using touch dispatcher ok but i still need help with the following...
1- how to kill aSprite and make new one dynamically
2- what is the registerWithTouchDispatcher used for
3- what is the different between using touchdispatcher or this methoed http://juanmunozar.blogspot.com/2009/02/cocos2d-iphone-dynamically-touch.html
4- do i have to use touch dispatcher on a class that inherits from lets say AtlasSprite to detect touches there...thanks
here is the full project ....Posted 2 years ago #
Reply
You must log in to post.