SuperMario icon indicating copy to clipboard operation
SuperMario copied to clipboard

no suitable method found for setRegion(Object)

Open murchie85 opened this issue 8 years ago • 5 comments

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?

murchie85 avatar Feb 06 '17 23:02 murchie85

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

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

OneSleepyDev avatar Mar 09 '17 18:03 OneSleepyDev

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.

murchie85 avatar Mar 12 '17 15:03 murchie85

thank you for information...

Samsung cihazımdan gönderildi

-------- Orjinal mesaj -------- Kimden: Adam McMurchie [email protected] Tarih: 12 03 2017 18:36 (GMT+03:00) Alıcı: BrentAureli/SuperMario [email protected] Cc: creative04 [email protected], Manual [email protected] Konu: Re: [BrentAureli/SuperMario] no suitable method found for setRegion(Object) (#16)

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/BrentAureli/SuperMario/issues/16#issuecomment-285952521, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AY2lpLJIJEeeo3MFWBtmGKO9IWd0sDnGks5rlBDfgaJpZM4L43C-.

creative04 avatar Mar 13 '17 06:03 creative04

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);

OneSleepyDev avatar Mar 17 '17 21:03 OneSleepyDev

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

jia-tang avatar Oct 06 '20 03:10 jia-tang