public void toggleKey(int KeyCode, boolean isPressed) {
		if (KeyCode == KeyEvent.VK_W) {
			up.toggle(isPressed);
		}
		if (KeyCode == KeyEvent.VK_S) {
			down.toggle(isPressed);
		}
		if (KeyCode == KeyEvent.VK_A) {
			left.toggle(isPressed);
		}
		if (KeyCode == KeyEvent.VK_D) {
			right.toggle(isPressed);
		}
		if(KeyCode==KeyEvent.VK_ESCAPE){
			exit.toggle(isPressed);
		}

	}