Jump to content

Search the Community

Showing results for tags 'extended sprite'.

  • 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. Hi all. I cant add animations to my extended sprite. This is de code I use for my extended sprite: // Here is a custom game objectBee = function (game, x, y, frame) {Phaser.Sprite.call(this, game, x, y, 'bee',frame);this.animations.add('fly');this.animations.play('fly',12, true);};Bee.prototype = Object.create(Phaser.Sprite.prototype);Bee.prototype.constructor = Bee;/** * Automatically called by World.update */Bee.prototype.update = function() {};This how it is instantiated: this.bee1 = new Bee(this, 100, 300);this.bee1.anchor.setTo(0.5, 0.5);this.add.existing(this.bee1);This how the spritesheet is loaded: this.load.spritesheet('bee', 'assets/bee_3x1.png', 27, 32, 3); And this is the error I get: However this works: this.bee2 = this.game.add.sprite(100,10,"bee");this.bee2.animations.add('fly');this.bee2.animations.play('fly',12, true);It seems I am not the only one with this problem: http://www.html5gamedevs.com/topic/4830-animations-adding-error-in-extended-sprite/ I am using: Phaser v2.0.3 Please, any help is very much appreciated. Thank you!
×
×
  • Create New...