src/gamecontroller.js
function() {
			for( var i = 0, j = this.touchableAreasCount; i < j; i++ ) {
				var area = this.touchableAreas[ i ];
				if( typeof area === 'undefined' ) continue;
				area.draw();
				// Go through all touches to see if any hit this area
				var touched = false;
				for( var k = 0, l = this.touches.length; k < l; k++ ) {
					var touch = this.touches[ k ];
					if( typeof touch === 'undefined' ) continue;
					var x = this.normalizeTouchPositionX(touch.clientX),
						y = this.normalizeTouchPositionY(touch.clientY);
					// Check that it's in the bounding box/circle
					if( area.check(x, y) && !touched) touched = this.touches[k];
				}

				if( touched ) {
					if( !area.active ) area.touchStartWrapper(touched);
					area.touchMoveWrapper(touched);
				} else if( area.active ) area.touchEndWrapper(touched);
			}
		}
function() {
			for( var i = 0, j = this.touchableAreasCount; i < j; i++ ) {
				var area = this.touchableAreas[ i ];
				if( typeof area === 'undefined' ) continue;
				area.draw();
				// Go through all touches to see if any hit this area
				var touched = false;
				for( var k = 0, l = this.touches.length; k < l; k++ ) {
					var touch = this.touches[ k ];
					if( typeof touch === 'undefined' ) continue;
					var x = this.normalizeTouchPositionX(touch.clientX),
						y = this.normalizeTouchPositionY(touch.clientY);
					// Check that it's in the bounding box/circle
					if( area.check(x, y) && !touched) touched = this.touches[k];
				}

				if( touched ) {
					if( !area.active ) area.touchStartWrapper(touched);
					area.touchMoveWrapper(touched);
				} else if( area.active ) area.touchEndWrapper(touched);
			}
		}
function ( ) { for ( var i = 0 , j = this . touchableAreasCount ; i < j ; i ++ ) { var area = this . touchableAreas [ i ] ; if ( typeof area === 'undefined' ) continue ; area . draw ( ) ; // Go through all touches to see if any hit this area var touched = false ; for ( var k = 0 , l = this . touches . length ; k < l ; k ++ ) { var touch = this . touches [ k ] ; if ( typeof touch === 'undefined' ) continue ; var x = this . normalizeTouchPositionX ( touch . clientX ) , y = this . normalizeTouchPositionY ( touch . clientY ) ; // Check that it's in the bounding box/circle if ( area . check ( x , y ) && ! touched ) touched = this . touches [ k ] ; } if ( touched ) { if ( ! area . active ) area . touchStartWrapper ( touched ) ; area . touchMoveWrapper ( touched ) ; } else if ( area . active ) area . touchEndWrapper ( touched ) ; } }
Processes the info for each touchableArea
Processes the info for each touchableArea