amethyst / amethyst/rfcs

Shutdown and cleanup missing behavior

Aperta
#14 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
32
Fork
10
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Currently, when you cleanly quit the game, there is no clean-up actions that can be ran (disconnecting from a server, saving something to a file, etc...)

There should be a way that the engine call the code from the user when the game is shutting down.

There is a method in Application::shutdown which is unused and could be re-used for that purpose.

There are two places (or more?) where exit code could be placed: State and System.

State is annoying, because you will probably end up copy pasting the shutdown method between your states.

System on the other hand would be a bit better since you could have a shutdown() method added to them. However, usually you will want your systems to be stateless, so having a cleanup method isn't really idea here either.

An rfc would need to be opened for discussion by the person taking this issue in charge.
Thanks!

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.