private void androidControlDraw() { Gdx.gl.glEnable(GL20.GL_BLEND); Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); sr.begin(ShapeType.Filled); sr.setProjectionMatrix(cam.combined); sr.setColor(MyConstants.rgba(255, 0, 0, 168)); sr.ellipse( (shoot.x - (shoot.width * .5f)), (shoot.y - (shoot.height * .5f)), shoot.width, shoot.height); sr.setColor(MyConstants.rgba(0, 128, 0, 168)); sr.ellipse( (jump.x - (jump.width * .5f)), (jump.y - (jump.height * .5f)), jump.width, jump.height); sr.setColor(MyConstants.rgba(128, 128, 128, 168)); sr.rect(start.x, start.y, start.width, start.height); sr.rect(left.x, left.y, left.width, left.height); sr.rect(right.x, right.y, right.width, right.height); sr.end(); sr.begin(ShapeType.Line); sr.setProjectionMatrix(cam.combined); sr.setColor(Color.WHITE); sr.rect(start.x, start.y, start.width, start.height); sr.ellipse( (shoot.x - (shoot.width * .5f)), (shoot.y - (shoot.height * .5f)), shoot.width, shoot.height); sr.ellipse( (jump.x - (jump.width * .5f)), (jump.y - (jump.height * .5f)), jump.width, jump.height); sr.rect(left.x, left.y, left.width, left.height); sr.rect(right.x, right.y, right.width, right.height); sr.setColor(MyConstants.rgba(210, 210, 210, 255)); if (MyInput.keyDown(MyInput.START)) { for (int i = 0; i < 5; i++) { sr.rect(start.x + i, start.y + i, start.width - (i * 2), start.height - (i * 2)); } } if (MyInput.keyDown(MyInput.LEFT)) { for (int i = 0; i < 5; i++) { sr.rect(left.x + i, left.y + i, left.width - (i * 2), left.height - (i * 2)); } } if (MyInput.keyDown(MyInput.RIGHT)) { for (int i = 0; i < 5; i++) { sr.rect(right.x + i, right.y + i, right.width - (i * 2), right.height - (i * 2)); } } if (MyInput.keyDown(MyInput.JUMP)) { for (int i = 0; i < 5; i++) { sr.ellipse( (jump.x - (jump.width * .5f)) + i, (jump.y - (jump.height * .5f)) + i, jump.width - (i * 2), jump.height - (i * 2)); } } if (MyInput.keyDown(MyInput.SHOOT)) { for (int i = 0; i < 5; i++) { sr.ellipse( (shoot.x - (shoot.width * .5f)) + i, (shoot.y - (shoot.height * .5f)) + i, shoot.width - (i * 2), shoot.height - (i * 2)); } } if (MyInput.keyPressed(MyInput.START)) Gdx.input.vibrate(35); if (MyInput.keyPressed(MyInput.LEFT)) Gdx.input.vibrate(35); if (MyInput.keyPressed(MyInput.RIGHT)) Gdx.input.vibrate(35); if (MyInput.keyPressed(MyInput.JUMP)) Gdx.input.vibrate(35); if (MyInput.keyPressed(MyInput.SHOOT)) Gdx.input.vibrate(35); sr.end(); sb.begin(); sb.setProjectionMatrix(cam.combined); Game.res.getFont("small").draw(sb, "Start", startSt.x, startSt.y, 0, Align.bottomLeft, false); Game.res.getFont("small").draw(sb, "Shoot", shootSt.x, shootSt.y, 0, Align.bottomLeft, false); Game.res.getFont("small").draw(sb, "Jump", jumpSt.x, jumpSt.y, 0, Align.bottomLeft, false); Game.res.getFont("small").draw(sb, "Right", rightSt.x, rightSt.y, 0, Align.bottomLeft, false); Game.res.getFont("small").draw(sb, "Left", leftSt.x, leftSt.y, 0, Align.bottomLeft, false); sb.end(); Gdx.gl.glDisable(GL20.GL_BLEND); }