hypebas.blogg.se

Texturepacker vs spritehelper
Texturepacker vs spritehelper













texturepacker vs spritehelper

  • void render() - Renders the currenly running state and any on-going transition, if there is one.
  • void update(float delta) - Updates the currently running state and and any on-going transition, if there is one.
  • void setState(State nextState, Transition transition) - Smoothly change the current state with a transition.
  • void setState(State nextState) - Instantly change the current state to a given next state.
  • static StateManager getInstance() - This is the way to access the StateManager (only after init(.) was called).
  • static void init(Camera camera, Viewport viewport) - Initializes the StateManager - call this once.
  • Because it is a singleton, there is global access to it, making it easy to use. The StateManager is exactly that - an entity that manages the states flow. Thus, every concrete state will necessarily implement atleast the following methods:
  • Disposing resources when their not needed anymore.Ī convenience implementation of the State interface.Įvery concrete state would be a subclass of AbstractState.
  • texturepacker vs spritehelper

    And the touch input can be converted between screen world coordinates.The most important information about the State is that it is capable of: In a game there would typically be a Play state, a Menu state, Game-Over state, etc, etc. States are, in some aspects, similar to Stages in Scene2D.

    texturepacker vs spritehelper

    It is really complete and well-written, and there's also loads of documentation over its various APIs. Note: There will be references to the official libGDX wiki. It also contains the assets used and a small walkthrough. It's important to references that every extension lib is totally independent of the core, meaning that you can use any extension without havingĮach section here will have a small overview, and some will have examples.Ī very simple example project (that will contain most of the topics below in action) can be found here. From asset managers to aesthetic utilities, it ranges between a (hopefully increasing) number The extensions are the libs and mini-libs that you can fetch as you need. This is useful to get up and running quickly, without having to deal with these The core is the base structure of the app - it handles states, how they are managed and the base app. A bunch of libraries for libGDX, aiming to be a useful resource for both experienced developers and newcomers.















    Texturepacker vs spritehelper