Yotam

Members
  • Content Count

    3
  • Joined

  • Last visited

About Yotam

  • Rank
    Newbie

Contact Methods

  • Website URL
    http://cs.gmu.edu/~ygingold/

Profile Information

  • Gender
    Not Telling
  1. This works great, thanks. I also added sprite.anchor.setTo( .5, .5 );so that the sprite reflects about its center.
  2. Is there a way to tell the AnimationManager that I want to flip certain frames? I have a spritesheet with a right-facing walk cycle. Must I duplicate the sprites and flip them to face left? Thanks!
  3. // This function computes the ascii for the key if it's an upper- or lower-case letter. function mykeydownhandler( evt ) { // Skip it unless it's a-z. if( evt.which < "A".charCodeAt(0) || evt.which > "Z".charCodeAt(0) ) { console.log( "Not a letter: ", evt.which ); return; } var letter = String.fromCharCode( evt.which ); if( !evt.shiftKey ) letter = letter.toLowerCase(); console.log( letter ); } In your create() function: game.input.keyboard.addCallbacks( this, mykeydownhandler );