rubyrpg / ruby_rpg

Ruby based game engine
6 stars 0 forks source link

Defer the destroy! callback #20

Closed MaxHatfull closed 1 month ago

MaxHatfull commented 2 months ago

The destroy! callback removes all the methods from an object. This should be done at the end of the frame. This way an object won't be destroyed midway through its own update loop, refer back to itself and crash. Instead we would run this at the end of the frame so it would complete its loop and stop.

MaxHatfull commented 1 month ago

Fixed by https://github.com/rubyrpg/ruby_rpg/pull/44