# megan

Members

7

• Rank
Newbie
1. ## Move Sprites in Parabolas

Thanks guys, both of your answers helped a lot! It works like a charm now, and it was wayyy easier that dealing with tweens and math
2. ## Move Sprites in Parabolas

I'm attempting to create a game where an item is launched into the air, bounces a few times on the ground, and then stops. (Points are given for distance covered) What I'm struggling with is how to make the item move in parabolas, so that it looks like it's bouncing? Is using a tween the best solution (and if so, how would I go about that?), or should I just be playing with gravity and velocity? Here's as far as I've gotten with the tweening. It should move in 3 arcs. bounceTween = this.game.add.tween(this.bounceItem).to({ x: distance }, 800, Phaser.Easing.Quadratic.InOut, this).to({ x: distance + distance / 2 }, 800, Phaser.Easing.Quadratic.InOut, this).to({ x: distance + distance / 2 + distance / 4 }, 800, Phaser.Easing.Quadratic.InOut, this);
3. ## Trigger once on overlap

I'm having a similar problem as Glaydur, but I also have an animation that plays after the first overlap, and before the sprite gets killed. The overlap gets triggered while the animation is playing, which is affecting the scoring of my game. Is there a way to keep the animation, and turn off physics or something after the first overlap? This is the code I'm using to play the animation and kill the sprite: goodItem.animations.play('explode', 10, false, true);goodItem.animations.killOnComplete = true;
4. ## iPhone 4 problem, the screen gets cut off below

I think it's a bug with iOS 4 Safari. You can read about how other people have been working around it here: http://stackoverflow.com/questions/2581957/iphone-safari-does-not-auto-scale-back-down-on-portrait-landscape-portrait?rq=1
5. ## Timers not Pausing when Window Loses Focus

I tried switching the "true" to "this" in the loop, and it still didn't work for me. However, I've been able to narrow down the problem. It seems to work fine in any situation, except for when game.stage.disableVisibilityChange = trueand then I switch to a new tab in my browser. Maybe it's because the game is still "playing", but it can't draw anything to the screen until it's visible again?
6. ## The Phaser 3 Wishlist Thread :)

Usage examples in the documentation. Don't get me wrong... the documentation seems very thorough from what I've seen so far, but it is a little tricky for a newbie like me to figure out how to use each function, just from reading the docs. Ability to scale canvases and images by percentages (as other people have mentioned)I do love what I've seen so far though! Keep up the great work!
7. ## Timers not Pausing when Window Loses Focus

I have a timer that creates stars every 800 ms. timer = game.time.events.loop(800, spawn_stars, true);It works great, but when the window loses focus the timers keep going. When focus is restored, all the stars that were spawned while the window was unfocused all show up at the same time (so there could be 100+ stars showing up at once, which isn't ideal for this game). This happens whether game.stage.disableVisibilityChangeis set to true or false. The timers stop properly when I use the game.paused function. Is this a bug, or is there something I'm not doing correctly?