Untitled


SUBMITTED BY: Guest

DATE: Aug. 8, 2014, 8:07 p.m.

FORMAT: JavaScript

SIZE: 267 Bytes

HITS: 978

  1. function Player(x, y, maxHealth) {
  2. this.sprite = game.add.sprite('player');
  3. this.health = maxHealth;
  4. this.maxHealth = maxHealth;
  5. }
  6. Player.prototype = {
  7. update: function() {
  8. this.sprite.animations.play('idle');
  9. }
  10. };

comments powered by Disqus