Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-29-2009, 11:28 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 216
Default Particles with cocos2d

Can someone please post code examples of how to do particles with cocos2d. I'm trying :

Code:
		CGSize size = [[Director sharedDirector] winSize];
		
		ParticleSystem *emitter = [ParticleExplosion node];
		emitter.position = ccp(size.width/2, size.height/2);
		[self addChild: emitter];
but my app crashes
johnathon is offline   Reply With Quote
Old 11-29-2009, 04:41 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 216
Default

Quote:
Originally Posted by johnathon View Post
Can someone please post code examples of how to do particles with cocos2d. I'm trying :

Code:
		CGSize size = [[Director sharedDirector] winSize];
		
		ParticleSystem *emitter = [ParticleExplosion node];
		emitter.position = ccp(size.width/2, size.height/2);
		[self addChild: emitter];
but my app crashes
I fixed it. I didn't have fire.png imported to my project
johnathon is offline   Reply With Quote
Old 12-03-2009, 06:53 AM   #3 (permalink)
iPhone Game Developer
 
max9xs's Avatar
 
Join Date: Dec 2009
Location: Ahmedabad
Posts: 10
Default

Hi, see the demo examples of cocos2d you can get idea...jst copy that code.and simply run....but dont forget to put "fire.png" file in resources folder
max9xs is offline   Reply With Quote
Old 03-18-2010, 06:04 AM   #4 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 1
Default

yes max9xs is right..u will get some well from there.
__________________
70-680 and 642-373 quesion and answers 1Y0-A17 and 220-701 guide
donson is offline   Reply With Quote
Old 03-18-2010, 07:04 PM   #5 (permalink)
Registered Member
 
Join Date: Jun 2009
Location: New Zealand
Posts: 189
Default

Take a look at ParticleExamples
LemonMeringue is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 343
20 members and 323 guests
ADY, Dani77, e2applets, Herbie, JasonR, keeshux, linkmx, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, sebasx, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:32 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0