ahlekoofe / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

New Lua-Function for EditObjectActuator: getLastCreatedObject #198

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There should be a way to get the last created object via lua.

In my patch I was not 100% sure what the best way how to handle the lifetime.
So when an object got removed by Gamekit there was still the reference to the
object even though it was released already. I added the gameobject to the 
gkGameObjectManager's InstanceListener and set the last created object to NULL 
if noftifyInstanceDestroyed is fired. Any other suggestions?

Original issue reported on code.google.com by thomas.t...@googlemail.com on 8 Nov 2011 at 4:47

Attachments:

GoogleCodeExporter commented 8 years ago
Patch is applied to trunk. Thanks.

Original comment by harkon...@gmail.com on 12 Nov 2011 at 1:32