LibGDX - SpriteBatch's .draw() method requiring float[]
- by just_a_programmer
Please excuse my lack of knowledge with LibGDX, as I have just started learning it.
I am going through some simple tutorials, and in one of them, I draw a string onto the screen like so:
// the following code is in the main file in the core project folder:
// this is in the create() method:
private SpriteBatch batch;
batch = new SpriteBatch();
// this is in the render() method:
batch.draw(batch, "Hello world", 200, 200);
I am getting an error saying: The method draw(texture, float[], int, int) in the type SpriteBatch is not applicable for the arguments (SpriteBatch, int, int)
So, LibGDX wants a float array to draw instead of a string?
Thanks in advance.