Tag Info

Hot answers tagged

2

Based on my memories and for example this: While it's difficult to understand the complicated ANDs and ORs, it seems clear that you forgot to check for the jumpButton being pressed after the other buttons. With leftButton and rightButton, you have Gdx.input.isTouched(0) as well as Gdx.input.isTouched(1) (with OR inbetween them, so I take that as you're ...


2

After some research and testing, I've now managed to resolve my own issue. The problem lied within memory management. I followed this tutorial Stiegert and got inspiration from his SoundManager class to create a new SoundManager of my own that uses LRU Caching. Thanks Alexandre Vaillancourt for the assistance


1

As the comment says offset only effects the children, i.e the text inside the button. What you need to look at is this piece of code: buttonStyle.up = new TextureRegionDrawable(settingsAtlas.findRegion("achievements")); buttonStyle.down = new TextureRegionDrawable(settingsAtlas.findRegion("achievements")); Since you set the same image for up and down you ...


1

Make sure you resize the viewport when you resize the window. You should be able to override the function 'resize' in your ApplicationAdapter. public class GameClass extends ApplicationAdapter { @Override public void resize(int width, int height) { YourUIStage.getViewport.setScreenSize(width, height); } }


1

Look here, you're using the listener wrong: http://stackoverflow.com/questions/11373390/button-clicklistener-is-not-working-in-libgdx-game (you're not overriding its methods, I suggest looking up some more information about listeners and especially this one). And use this question to make sure you're adding the stage and the actor right and that you're ...


1

I personally never calculate an angle like that. I like to work with vectors, it might be slightly less efficient but this way you can do it step by step, it gets more readable and easier to understand. So what is a vector? A vector is essentially a direction and a magnitude together. Often in games it is used as a position data structure too but ...



Only top voted, non community-wiki answers of a minimum length are eligible