Skip to content

Instantly share code, notes, and snippets.

@zeromancer
Last active February 20, 2017 21:15
Show Gist options
  • Save zeromancer/063c2d585246ff8702e95a81edaeb761 to your computer and use it in GitHub Desktop.
Save zeromancer/063c2d585246ff8702e95a81edaeb761 to your computer and use it in GitHub Desktop.
Libgdx Scene2d Actor System Overview Diagram
  • most basic way to display(draw) an image onscreen
  • can be done with either Stateless(Texture, TextureRegion) or Stateful(Sprite)
  • with the Stateless(Texture, TextureRegion) approach -> you need to specify the x,y coordinates on each draw call
  • with the Stateful(Sprite) approach -> the needed x,y coordinates are saved into the Sprite object itself
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
  • Actor extends Sprite and allows for additional functionality like mouse hover/click
  • the (optional) Skin can be used to modify the viewing part the Actor actor depending on the actors state. Example: Button class changes the image if it is hovered, clicked, disabled, etc and the ButtonStyle allows to define a different image for each state
  • allows the usage of Actions -> to manipulate/animate(move,flip,etc..) Actors on the Stage
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
  • allows to stick together Widgets(Buttons,Labels,etc) to define an UI
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment