简体   繁体   中英

SpriteBatch is not applicable for the arguments JAVA libgdx

I am trying to use sprite batch to rotate a rectangle with a texture like so:

game.batch.draw(Image, (float)x, (float)y, (float)42.5, (float)33, (float)85, (float)66, (float)1, (float)1, (float)angleDegrees);

But i get the error:

The method draw(Texture, float, float, float, float, float, float, float, float) in the type SpriteBatch is not applicable for the arguments (Texture, float, float, float, float, float, float, float, float, float)

I think i have the right amount of parameters, and they are all floats, what am i missing.

You do not have the right amount of parameters. You have one float too much. Thats how I would put it in an editor to see whats the problem by such a bunch of parameters.

The method draw(
Texture, float, float, float, float, float, float, float, float) 
in the type SpriteBatch is not applicable for the arguments (
Texture, float, float, float, float, float, float, float, float, **float**)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM