Jump to content

Search the Community

Showing results for tags 'spritessheet'.

  • 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. After 5 hours I still can't get a decent animation. My eyes and head already hurt. And there I thought this was supposed to be a breeze. function preload () { game.load.spritesheet('idle', 'resources/standing/krn_standing.png', 138, 359); game.load.spritesheet('running', 'resources/running/krn_running.png', 321, 357); }function create () { player = game.add.sprite(game.world.width / 2, 0, 'idle'); player.animations.add('idle'); player.animations.add('running');}function update() { if (controls.right.isDown) { player.body.velocity.x = 150; player.animations.play('running', 10, true); } else { player.body.velocity.x = 0; player.animations.play('idle', 10, true); } }}player.add.sprite loads a spritesheet and uses it only. Regardless of the fact that I add other spritesheets and animations. Only the idle sequence is being played. I've tried cramming 'idle' and 'running' in one png file and defining with an array from which frame to which to do what. The result - the entire sheet played and disappeared. Even though it was set to loop. Can't reproduce that as I don't remember how I did it.
×
×
  • Create New...