Jump to content

Search the Community

Showing results for tags 'spitesheet'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. I have the animation of hero in one spritesheet file: spritesheet1.png preload: game.load.atlasJSONHash('spritesheet1', 'assets/entities/spritesheet1.png', 'assets/entities/spritesheet1.json');create: var hero = game.add.sprite(100, 100, 'spritesheet1');hero.animations.add('animName1', Phaser.Animation.generateFrameNames('animName1_', 0, 16, '', 4), 30);hero.animations.play('animName1', 30, true); also I have the "health bar" at that spitesheet1.png How is better to add that sprite from spritesheet? I do like that: var healthBar = game.add.sprite(250, 270, 'spritesheet1');healthBar.animations.add('healthBar', Phaser.Animation.generateFrameNames('healthBar_', 0, 0, '', 4), 30);healthBar.animations.play('healthBar');and I think that it's no a good way, may be is there a simple way to do? Yes, I know that I can load the healtBar as separate image (healthBar.png), but I want to keep all art in one spritesheet.
×
×
  • Create New...