Javier

Members
  • Content Count

    2
  • Joined

  • Last visited

About Javier

  • Rank
    Newbie
  • Birthday 12/21/1979

Contact Methods

  • Website URL
    http://capsulaweb.com.mx
  • Twitter
    oui55

Profile Information

  • Gender
    Male
  • Location
    Monterrey, Mexico
  1. collide: function() { if(!game.scene.ended) { game.scene.gameOver(); this.body.velocity.y = -200; //added this.sprite.alpha=0; this.sprite= new game.Sprite('choque'); this.sprite.anchor.x = 0.2; this.sprite.anchor.y = 0.5; game.scene.stage.addChild(this.sprite);//added } this.body.velocity.x = 0; return true; }, update: function() { this.sprite.position.x = this.body.position.x; this.sprite.position.y = this.body.position.y; //added if(this.body.position.y>750){ this.sprite.alpha=0; this.sprite= new game.Sprite('caida'); this.sprite.anchor.x = 0.7; this.sprite.anchor.y = -0.5; this.sprite.position.x = this.body.position.x; this.sprite.position.y = this.body.position.y; game.scene.stage.addChild(this.sprite); }//added },I already did and it works but i am pretty sure there is a better way to do it.
  2. I am using flaying dog to learn panda. I have made some little changes in the game by my own but i cant figured out how to use diferent sprits when the object crashes and when the object land. Any help?