Search the Community

Showing results for tags 'fundamental'.



More search options

  • 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
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

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 there, I have a fundamental question about Phaser Sprites and Animations. What I want is to play an animation and then go back to the first frame of an spritesheet. The first frame of the spritesheet however is not part of the animation. Some code here: figure1 = game.add.sprite(300, 1400, 'figure1');figure1.animations.add('stand', [0], 1, false);figure1.animations.add('dosomething', [1,2,3,4,5,6], 6, false);figure1.inputEnabled = true;figure1.events.onInputDown.add(function() { figure1.animations.play('dosomething');}, this);figure1.events.onAnimationComplete.add(function(){ figure1.animations.play('stand');}, this);So, this should play the "dosomething" animation (frame 1 to 6) when the sprite is being clicked. After the animations completes it should go back to the initial position, which is contained in frame 0 = "stand animation". So here go the questions, is this the way to go? Do I have to create a "stand" pseudo animation? or is there some easier/better way to achieve this? (I am also just seeing, the stand animation would indefinitely fire the onAnimationsComplete event?!) Kind regards, Stefan