Jump to content

Search the Community

Showing results for tags 'animation textures noob'.

  • 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'm very much a n00b at Phazer and I come from a gamemaker background. Basically I'm making a platformer in which the player has a walking animation and a standing animation and I don't know how to properly switch between the two in a way that preserves the animation. all the animations are in seperate pngs. Here's what I got so far: var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload() { game.load.image('sky', 'assets/sky.png'); game.load.image('ground', 'assets/platform.png'); game.load.image('star', 'assets/star.png'); game.load.spritesheet('df-run', 'assets/Darkfire-run.png', 32, 32); game.load.spritesheet('df', 'assets/Darkfire.png', 32, 32);}var player;var platforms;var cursors;function create() {... // The player and its settings player = game.add.sprite(32, game.world.height - 150, 'df'); player.animations.add('df-standing'); player.animations.play('df-standing', 50, true); player.anchor.x =0.5; player.anchor.x =0.5;... // Our controls. cursors = game.input.keyboard.createCursorKeys(); cursors.right.onDown.add(function () { console.log("down right", 0); player.loadTexture('df-run'); }); cursors.left.onDown.add(function () { player.loadTexture('df-run', 0); }); cursors.right.onUp.add(function () { console.log("up right"); player.loadTexture('df', 0, false); });}function update() {...}
×
×
  • Create New...