Jump to content

Search the Community

Showing results for tags 'isRunning'.

  • 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 2 results

  1. Hi, I want to check whether a sequence of tweens has completed. However, the 'isRunning' flag only indicates whether the first step is 'running'. During step 2-4 in the example below it's set to false. It will be set to true again on the first step if the sequence loops. Is this how it's supposed to work? Is there a simple way to check whether the entire (non-looping) sequence has completed? var game = new Phaser.Game(640, 480, Phaser.CANVAS, '');var tween;var thing;var main_state = { create: function() { thing = {x: 10, y: 100 }; tween = game.add.tween(thing); tween.to({x: 10, y: 300 }, 1000, Phaser.Easing.Bounce.Out); tween.to({x: 200, y: 300 }, 1000); tween.to({x: 200, y: 100 }, 1000); tween.to({x: 10, y: 100 }, 1000); // tween.loop(); tween.start(); }, render: function() { game.debug.text('tween.isRunning: ' + tween.isRunning, thing.x, thing.y); }};game.state.add('main', main_state);game.state.start('main');
  2. Hey all, I'm trying to initiate different sprite tweens at different times on a variety of sprites that are in a group (non-looping tweens). I don't want to tell a already tweening sprite to start() though since it resets it's x and y to the beginning and it looks choppy. I noticed that on the Phaser github, it says this was already fixed: Tween - isRunning not reset when non-looped tween completes, but after downloading the newest code, I still have this issue. I even tried setting isRunning true and managing it myself, but it's still forced to false every-time. My sample code: if(!tentacles[main.octopus.tentaclesAnimNum].tween.isRunning){ tentacles[main.octopus.tentaclesAnimNum].tween.start(); } Any help would be greatly appreciated!
×
×
  • Create New...