Moving and rotating hero, Improved buttons


As I go along I’m finding things quite easy to understand and implement.  This is a testament both to PBE and to AS3.

Today I’ve done the following:

  • Added a custom colored button class to incorporate all style preferences so they don’t have to be explicitly set for each button instance.
  • Added keyboard input for arrow keys.
  • Figured out the basics of property references and spatial components, along with the new SpriteRenderer class, allowing the arrow keys to control the hero’s position and rotation.  In other words, the hero always points in the direction it’s moving, and it can move in any direction.
  • Added bounding for the hero position so it can’t walk off screen.
  • Added Pause Game logic while the menu is up.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>