public void updateGameOver(float delta) { position.add(velocity.cpy().scl(delta)); if (position.x <= -getWidth()) { position.x = -getWidth() * 2; } bounds.setPosition(position); }
public void update(float delta) { position.add(velocity.cpy().scl(delta)); if (position.x <= -getWidth()) { position.x = Gdx.graphics.getWidth(); position.y = ((float) (Math.random() * (max))) - 10; } bounds.setPosition(position); }
public void setPosition(float x, float y) { this.x = x; this.y = y; sprite.setPosition(x, y); hitBox.setPosition(x, y); }
public void reposition(float x) { posTopPipe.set(x, rand.nextInt(FLUCTUATION) + PIPE_GAP + LOWEST_OPENING); posBotPipe.set(x, posTopPipe.y - PIPE_GAP - bottomPipe.getHeight()); boundsTop.setPosition(posTopPipe.x, posTopPipe.y); boundsBot.setPosition(posBotPipe.x, posBotPipe.y); }
public void setPosition(float x, float y) { bounds.setPosition(x, y); }
public void reposition(float x) { posTopTube.set(x, rand.nextInt(FLUCTUATION) + LOWEST_OPENING + TUBE_GAP); posBottomTube.set(x, posTopTube.y - TUBE_GAP - bottomTube.getHeight()); boundsTop.setPosition(x, posTopTube.y); boundsBottom.setPosition(x, posBottomTube.y); }
public void update() { Collision(gc.world); bound.setPosition(X, Y); }
private void updateCollisionRectangle() { collisionRectangle.setPosition(x, y); }