function Clicked(mouseX, mouseY, shapeArr)
{
	for (var i = shapeArr.length - 1; i >= 0; i--)
	{
		var tempX = -1;
		var tempY = -1;
		
		if (this.right === true)
			tempX = mouseX + shapeArr[i].xIncrement;
		else
			tempX = mouseX - shapeArr[i].xIncrement;
			
		if (this.down === true)
			tempY = mouseY + shapeArr[i].yIncrement;
		else
			tempY = mouseY - shapeArr[i].yIncrement;
		
		if ((shapeArr[i].IsClicked(tempX, tempY) && shapeArr[i].currentShape) === true || (shapeArr[i].IsClicked(mouseX, mouseY) && shapeArr[i].currentShape) === true)
		{
		    if (soundToggle === "False") {
		        //make a correct answer sound
		        audio = new WebAudioAPISound("../../Audio/soundEffects/elevatorDing.mp3");
		        audio.play(audio);
		    }

			numOfCorrectClicks++;
			SetCurrentShape(shapeArr);
			break;
		}
	}
}
//not very accurate dectection at the moment
not very accurate dectection at the moment
not very accurate dectection at the moment
function Clicked(mouseX, mouseY, shapeArr)
{
	for (var i = shapeArr.length - 1; i >= 0; i--)
	{
		var tempX = -1;
		var tempY = -1;
		if (this.right === true)
			tempX = mouseX + shapeArr[i].xIncrement;
		else
			tempX = mouseX - shapeArr[i].xIncrement;
		if (this.down === true)
			tempY = mouseY + shapeArr[i].yIncrement;
		else
			tempY = mouseY - shapeArr[i].yIncrement;
		if ((shapeArr[i].IsClicked(tempX, tempY) && shapeArr[i].currentShape) === true || (shapeArr[i].IsClicked(mouseX, mouseY) && shapeArr[i].currentShape) === true)
		{
		    if (soundToggle === "False") {
		        audio = new WebAudioAPISound("../../Audio/soundEffects/elevatorDing.mp3");
		        audio.play(audio);
		    }
			numOfCorrectClicks++;
			SetCurrentShape(shapeArr);
			break;
		}
	}
}
function Clicked ( mouseX , mouseY , shapeArr ) { for ( var i = shapeArr . length - 1 ; i >= 0 ; i -- ) { var tempX = - 1 ; var tempY = - 1 ; if ( this . right === true ) tempX = mouseX + shapeArr [ i ] . xIncrement ; else tempX = mouseX - shapeArr [ i ] . xIncrement ; if ( this . down === true ) tempY = mouseY + shapeArr [ i ] . yIncrement ; else tempY = mouseY - shapeArr [ i ] . yIncrement ; if ( ( shapeArr [ i ] . IsClicked ( tempX , tempY ) && shapeArr [ i ] . currentShape ) === true || ( shapeArr [ i ] . IsClicked ( mouseX , mouseY ) && shapeArr [ i ] . currentShape ) === true ) { if ( soundToggle === "False" ) { audio = new WebAudioAPISound ( "../../Audio/soundEffects/elevatorDing.mp3" ) ; audio . play ( audio ) ; } numOfCorrectClicks ++ ; SetCurrentShape ( shapeArr ) ; break ; } } }
not very accurate dectection at the moment
not very accurate dectection at the moment
//make a correct answer sound