SuperMario
SuperMario copied to clipboard
no suitable method found for setRegion(Object)
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?
Sorry for the delay, have you found a solution for your problem?
If not, could you link to the file you're working in?
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.
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-.
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);
Hey I got the same problem. let me know how u fixed it