asc3ndpony

Members
  • Content count

    1
  • Joined

  • Last visited

About asc3ndpony

  • Rank
    Newbie
  • Birthday 01/12/1995

Profile Information

  • Gender
    Male
  1. Hi Phaser users, I've been using Phaser for about three weeks and have hit my first wall. I'm making a 2d fighting game and while I have basic attacks working, Phaser apparently kills the sprite on collision with an attack. I'm wanting to set a fixed amount of health so that instead of instantly killing the sprite, the game subtracts the health from the sprite. My sprite names are "player" and "player2", and when I went to the Chrome console, I typed in player and noticed that the player object inherits from Phaser.Sprite. I saw there were already properties in the Phaser.Sprite object that I think would be useful, such as health and damage. I saw in the API they're listed under the Phaser.Component section, but I didn't see any example under the Examples tag that used them. How would I go about using these properties with my "player" and "player2" sprites? Any help you can provide is greatly appreciated.