Game Development Reference
In-Depth Information
Figure 9-9 . Saving a particle effect from Particle Designer requires you set the file format to cocos2d. Embedding
the texture into the plist file is optional
For the saved particle effect to be usable by cocos2d, you must set the File Format set-
ting to cocos2d (plist). You can also check the Embed texture box, which will save the
texture into the plist file. The benefit is that you only have to add the plist file to your
Xcode project; the downside is that you then can't change the effect's texture without
loading the particle effect back into Particle Designer.
After saving the effect, you have to add the effect plist and, if you didn't embed the
texture, the effect's PNG file to your Xcode project's Resources group. In the
ParticleEffects01 project, I've added both variants, one effect with a separate
PNG texture and another effect that has the texture embedded in the plist file.
Listing 9-4 shows how I modified the runEffect method to load the Particle
Designer effects.
Listing 9-4 .
Using a Particle Effect Created with Particle Designer
 
 
 
Search Nedrilad ::




Custom Search