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 / delete all objects after exit the game

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 31st May 2015 11:03
Hi.

I have a question and know this question is ridiculous.

my made game is like flappy bird and don't need wrote function for delete sprites. Now want know if I click on exit button, all sprites automatically removed? or I should manually call delete functions before exit the game?

I think do this happen but I'm not sure.so decide ask this question.

Thanks.
Daqs
9
Years of Service
User Offline
Joined: 23rd May 2015
Location:
Posted: 31st May 2015 11:15
Please correct me if I have understood your question incorrectly. Are you trying to delete sprites and other objects?

I have been asking the same sort of questions in the forum. The ideal way of doing so is by using destructors. You can know more about it here: http://www.cprogramming.com/tutorial/constructor_destructor_ordering.html

Also, you can delete independent objects such as sprites, images, etc. by using AppGameKit functions such as, void agk:eleteAllSprites(), etc.

Hope it helps!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st May 2015 11:22
In Tier 1 on exiting the game, you don't need to delete all the resources.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 31st May 2015 11:47
Ok, Thanks BatVink.

Login to post a reply

Server time is: 2024-09-29 01:14:46
Your offset time is: 2024-09-29 01:14:46