-
Book Overview & Buying
-
Table Of Contents
Cocos2d Game Development Blueprints
By :
To improve the tasks involved in drawing a texture on the screen, we can take advantage of the CCSpriteBatchNode class, which wraps the multiple sprite renders in just one execution.
The only objects that can be added to CCSpriteBatchNode are CCSprite instances or any other class derived from CCSprite. There is another restriction: every child in the batch must make use of the same texture, but we will see in the next section that this isn't in fact a weakness.
Let's learn how to use this class by adding several enemies to the scene, so let's add the image that will represent them:
human-ipad.png and human-ipadhd.png files in the Resources folder.Define a constant value for the number of human enemies that will be loaded by adding the following line to...
Change the font size
Change margin width
Change background colour