From 04343eda8c2f870b0da55cfdc8003c99fe1cc4de Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:53:10 -0700 Subject: Remove trailing spaces --- .../RDGE/src/core/script/objectManager.js | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'js/helper-classes/RDGE/src/core/script/objectManager.js') diff --git a/js/helper-classes/RDGE/src/core/script/objectManager.js b/js/helper-classes/RDGE/src/core/script/objectManager.js index cb9847e6..768768ff 100755 --- a/js/helper-classes/RDGE/src/core/script/objectManager.js +++ b/js/helper-classes/RDGE/src/core/script/objectManager.js @@ -37,18 +37,18 @@ RDGE.objectManager = function() { this.objects = []; this.numObjects = 0; this.freelist = []; - + this.reset = function() { this.objects = []; this.freelist = []; this.guidCounter = 0; } - + // validHandle this.validHandle = function(h) { return this.handleToIndex(h) != -1; } - + // handleToIndex this.handleToIndex = function(h) { var index = ( h >> 16 ) & 0xFFFF; @@ -58,35 +58,35 @@ RDGE.objectManager = function() { return -1; } - // handleToObject + // handleToObject this.handleToObject = function(h) { - var index = this.handleToIndex( h ); + var index = this.handleToIndex( h ); if( index != -1 ) { return this.objects[index]; } return null; } - + // add object this.addObject = function(ob) { var index = this.objects.length; if( this.freelist.length > 0 ) { - index = this.freelist.pop(); + index = this.freelist.pop(); } if( ++this.guidCounter >= 0xFFFF ) { // wrap the counter, zero is reserved for invalid handles. this.guidCounter = 1; } - ob.handle = ( index << 16 | ++this.guidCounter ); + ob.handle = ( index << 16 | ++this.guidCounter ); this.objects[index] = ob; - + return ob.handle; } - + // remove object - this.removeObject = function(h) { - var index = this.handleToIndex( h ); + this.removeObject = function(h) { + var index = this.handleToIndex( h ); if( index != -1 ) { if( this.objects[index].onremove != undefined ) { this.objects[index].onremove(); -- cgit v1.2.3