| 1 | function Scene() |
| 2 | { |
| 3 | this.activeObjects = []; |
| 4 | |
| 5 | this.addObject = function(obj) |
| 6 | { |
| 7 | this.activeObjects.push(obj); |
| 8 | } |
| 9 | |
| 10 | this.destroy = function() |
| 11 | { |
| 12 | for(var i = 0; i < this.activeObjects.length; i++) |
| 13 | { |
| 14 | this.activeObjects[i].destroy(); |
| 15 | } |
| 16 | } |
| 17 | } |