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
GdxSetup: Update generated main class to look more modern #7353
base: master
Are you sure you want to change the base?
GdxSetup: Update generated main class to look more modern #7353
Conversation
Could define position on one line as If we're doing this, as much as I love how iconic the eye-bleeding red is, I'm really tempted to If |
I was thinking about doing something similiar as Phaser which has the logo bouncing around with a particle effect. You can paste the sample code into an html and open it with your browser to see for youself: https://phaser.io/tutorials/getting-started-phaser3/part5 But that would require a bit more code so I opted for the simpler solution that is still a big improvement imo. Also I can't test on all platforms so I didn't want to deviate from the working code too much. As for the code I first used a vector for the position but then the initialization would be spread over 2 lines and I wanted the sample code to look as simple and tidy as possible. |
|
aef2c9a
to
6b9e17d
Compare
Sounds good. I changed it. |
Can alternatively use a // create
img = new Sprite(new Texture("logo_dark.png"));
img.setCenterX(Gdx.graphics.getWidth() / 2f);
img.setCenterY(Gdx.graphics.getHeight() / 2f);
// render
img.draw(batch);
// dispose (seems pointless)
img.getTexture().dispose(); Underscores in filenames can be a bit sketchy if they're ever run through Texture Packer, so often dashes are used instead. E.g. I should leave this place now, as I could go on indefinitely. It's such a difficult thing, knowing what's ideal to have in the main class. Something that says "it is working; welcome to libGDX." |
The project that is generated by GdxSetup looks quite dated with its bright red background and the pixelated Bad Logic Games logo.
I updated it to make it look more modern.
Before:
After: