Jump to content

Search the Community

Showing results for tags 'spirte.animations'.

  • 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. With this code: tempBrick.animations.add('idle', ['brick_' + bID + '_1.png'], 10, false, false); tempBrick.animations.add('brick_die', [ 'brick_' + bID + '_1.png', 'brick_' + bID + '_2.png', 'brick_' + bID + '_3.png', 'brick_' + bID + '_4.png' ], 10, false, false); tempBrick.animations.add('brick_popin', [ 'brick_' + bID + '_4.png', 'brick_' + bID + '_3.png', 'brick_' + bID + '_2.png', 'brick_' + bID + '_1.png' ], 10, false, false);And then later I want to play and add custom callback when animation is played: I saw that there is: onComplete() and also a onAnimationComplete event but for that I need the animation instance... So what i thought is to get the instance from the sprite.animations ... something like sprite.animations.get("brick_die"); But the animationMnager doesn't have such a thing... there is a /*** @property {object} _anims - An internal object that stores all of the Animation instances.* @private*/ this._anims = {}; But I don't think it's supposed to be used... Also I could make a instance once I'm adding them to the sprite.animation like: var IdleBrickAnimation = tempBrick.animations.add('idle', ['brick_' + bID + '_1.png'], 10, false, false); and then: IdleBrickAnimation.onComplete(myCallBack); But since I do it in the different places and methods I expected that there is a way to get a animation by name and then play it and add a callback specifically for this play.
×
×
  • Create New...