thomas-alrek / JSGame

JavaScript + Canvas 2D game engine
GNU General Public License v2.0
56 stars 6 forks source link

Add Garbage collection option for GameObject #4

Open thomas-alrek opened 8 years ago

thomas-alrek commented 8 years ago

Each GameObject should have a _gc method, that returns true/false if the object should be garbage collected. If true, JSGame should clear it from it's children object