Search the Community
Showing results for tags 'sequence'.
-
Here's my demo which uses cloth physics from Marvelous Designer. Basically I'm using baked physics from another engine. Framerate is consistent but there is a long load time on first load. http://punkoffice.com/fabric
-
Hello, What I'm trying to achieve and I am sure that it can be done is the following: I have two sprite-sheets one with the entity animation and one with some explosion. Can I combine these two (not in the same image but programmatically) so that the explosion plays when the entity is killed? I thought to add them to the same group and simply animate the "explosion instance" of that group in which the entity dies, but I wanted to ask if there is a more "refined" way to do this. Also how can I sequence these animations (entity killed and then explosion plays)? Thanks for your time!
-
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');