Comments (2)
Hey @Frosty-J!
In libGDX, we have the likes of public class InputAdapter implements InputProcessor. Would something like this be sensible for libgdx-screenmanager?
The "idiomatic" approach in libgdx-screenmanager would be to define your own Screen
class, i.e. MyCoolGameBaseScreen
, which extends ManagedScreen
and then use that in your Game
class as follows:
public class MyCoolGame extends ManagedGame<MyCoolGameBaseScreen, ScreenTransition> {
// ...
}
This has the advantage that one can add various other useful (game-specific) features to the base screen. But I can see that for most smaller games (and probably for jam games in particular) that is just more boilerplate code. Hence, I think adding a screen adapter makes sense and also aligns the library closer to the way libGDX itself is structured.
I've never used create() (don't see much advantage to it over a constructor)
The create()
method has one main advantage: it allows you to defer initializing the screens. This can come in handy if you are using a loading screen to load your assets first (the loading screen can then call ManagedScreen#initializeScreen()
which internally calls create()
) or when you want to defer loading until the screen is first shown (by default create()
is called after the screen is first pushed).
from libgdx-screenmanager.
I've kinda lost touch with libGDX as of late, but next time I'll make my own base Screen
and see how that goes.
from libgdx-screenmanager.
Related Issues (20)
- Inverted Y values
- Screenmanager.push() isnt working HOT 3
- Slicing Transitions with high slice counts are not working HOT 2
- Feature request: An event in ManagedScreen that is called each time a transition ends, on both involved screens HOT 3
- BUG: Does not work on Android HOT 3
- GWT build issue HOT 2
- Remove the libgdx-screenmanager-gwt extension
- crash when minimizing HOT 6
- unable to get dependancies for 0.6.8 HOT 6
- Help GLTransitionsShaderTransition HOT 3
- Can I add screen to screenmanager when it is required? HOT 3
- Can I use show() in ManagedScreen class or use create() only HOT 3
- resize() should be after show() in life cycle. HOT 1
- Cannot access ManagedGame HOT 1
- The currently bound framebuffer (0) doesn't match this one HOT 5
- crash on ios HOT 3
- e: Supertypes of the following classes cannot be resolved.
- Inconsistencies between libgdxs implementation of setScreens() and screenmanager. HOT 3
- Little ideas HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgdx-screenmanager.