Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no suitable method found for setRegion(Object) #16

Open
murchie85 opened this issue Feb 6, 2017 · 5 comments
Open

no suitable method found for setRegion(Object) #16

murchie85 opened this issue Feb 6, 2017 · 5 comments

Comments

@murchie85
Copy link

Hi guys, I keep getting the same problem over again anytime i use the getframe i.e. setRegion(walkAnimation.getKeyFrame(stateTime, true));
Getting this long error..
Error:(33, 8) Gradle: error: no suitable method found for setRegion(Object)
method TextureRegion.setRegion(Texture) is not applicable
(argument mismatch; Object cannot be converted to Texture)
method TextureRegion.setRegion(TextureRegion) is not applicable
(argument mismatch; Object cannot be converted to TextureRegion)
Any ideas?

@OneSleepyDev
Copy link

Sorry for the delay, have you found a solution for your problem?

If not, could you link to the file you're working in?

@murchie85
Copy link
Author

Hi,
No worries, I have tried recoding from scratch - before I got there I noticed an issue with the new Animation(0.4f, frames). My latest cut of the code is here dude https://github.com/murchie85/smario
any help much appreciated.

@creative04
Copy link

creative04 commented Mar 13, 2017 via email

@OneSleepyDev
Copy link

I was looking at the code for differences between your and Brent's Mario.java.
Why do you use getTexture? (I'm not sure what getTexture returns here)

Yours

marioStand = new TextureRegion(getTexture(), 0,0, 16,16);

Brent's

marioStand = new TextureRegion(screen.getAtlas().findRegion("little_mario"), 0, 0, 16, 16);

@jia-tang
Copy link

jia-tang commented Oct 6, 2020

Hey I got the same problem. let me know how u fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants