Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / What is the difference between StopSprite() and SetSpriteActive(false)?

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 30th Dec 2011 06:51
I want to pause a sprite ,which way should I use?

The Miracrea Games
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 30th Dec 2011 07:53
I believe SetSpriteActive() controls both animation and physics while the StopSprite() only effects the animation. So if you want to pause only the animation then use StopSprite(). If you want to stop both animation and physics, then use SetSpriteActive(false).

halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 30th Dec 2011 07:55
@Hodgey, I see. Thank you very much!

The Miracrea Games
mr_d
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 30th Dec 2011 09:35
just to add that i think that setspriteactive also affects other properties of the sprite like collision (e.g. getspritehit) as well as physics...

halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 31st Dec 2011 03:36
@mr_d : Thank you!

The Miracrea Games

Login to post a reply

Server time is: 2024-11-22 20:27:19
Your offset time is: 2024-11-22 20:27:19