Reset sprite batch color when rendering menu button

This commit is contained in:
Matt Low 2018-11-22 21:21:32 +04:00
parent a9bca04f1c
commit 35dea75776

View File

@ -2,6 +2,7 @@ package com.me.brickbuster.state;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.math.Vector3;
import com.me.brickbuster.BrickBuster;
@ -23,6 +24,7 @@ public class MenuState extends State {
public void render() {
game.sb.setProjectionMatrix(game.cam.combined);
game.sb.begin();
game.sb.setColor(Color.WHITE);
game.sb.draw(playButton,
BrickBuster.BOARD_WIDTH/2-playButton.getWidth()/2,
BrickBuster.BOARD_HEIGHT/2-playButton.getHeight()/2);