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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 01-17-2012, 11:01 AM   #1 (permalink)
iPhone SDK fanatics!
 
Join Date: Aug 2009
Location: Malaysia
Posts: 405
KennyChong is on a distinguished road
Default Cocos2D Sprites auto removal

Hi All,

I am working on a game app with bullets shooting zombies. I have lots of Zombies in the game play.

When bullet hit the zombies, I would like to show an animation with a sprite sheet showing the zombie dropping, die and disappear from the scene.

How can I can this easy without having to track it? i.e. Fire a animation sprite in X,Y coordinate, let the animation run, then remove that animation sprite from screen and memory.

Thanks.
__________________
KennyChong
iPhone SDK Fanatic!
KennyChong is offline   Reply With Quote
Old 01-23-2012, 03:27 PM   #2 (permalink)
Registered Member
 
keeshux's Avatar
 
Join Date: Aug 2011
Location: Italy
Posts: 50
keeshux is on a distinguished road
Default

Quote:
Originally Posted by KennyChong View Post
Hi All,

I am working on a game app with bullets shooting zombies. I have lots of Zombies in the game play.

When bullet hit the zombies, I would like to show an animation with a sprite sheet showing the zombie dropping, die and disappear from the scene.

How can I can this easy without having to track it? i.e. Fire a animation sprite in X,Y coordinate, let the animation run, then remove that animation sprite from screen and memory.

Thanks.
Just run a CCSequence with a CCCallFuncN or CCCallFuncO (there are even more variants) at the end where you removeFromParentAndCleanup: the target sprite.
__________________
Website: http://algoritmico.com
Twitter: http://twitter.com/keeshux
GitHub: http://github.com/keeshux
keeshux is offline   Reply With Quote
Old 01-23-2012, 04:16 PM   #3 (permalink)
iPhone SDK fanatics!
 
Join Date: Aug 2009
Location: Malaysia
Posts: 405
KennyChong is on a distinguished road
Default

Quote:
Originally Posted by keeshux View Post
Just run a CCSequence with a CCCallFuncN or CCCallFuncO (there are even more variants) at the end where you removeFromParentAndCleanup: the target sprite.
Thanks. Will try this. Cheers
__________________
KennyChong
iPhone SDK Fanatic!
KennyChong 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: 385
8 members and 377 guests
apatsufas, comicool, dansparrow, husthlj, LunarMoon, mer10, Murphy, pbart
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,677
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, husthlj
Powered by vBadvanced CMPS v3.1.0

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