Search the Community
Showing results for tags 'deceleration'.
Hi everyone, I'm a newbie and I'm having troubles tweaking a game (currently using Phaser format offline on Atom). 1) My player is expected to jump lower and lower as he gets stars along the way, so I'm guessing a kind of deceleration but concerning gravity. 2) He should start flying when he eats a mushroom (gravity here too?). Before getting the mushroom he jumps with the space bar but then he is supposed to start flying by pressing the up cursor. Are there any commands/ codes that could help me with that? I bet it has an easy solution but I can't figure it out. Thank
I am trying to create a little game but i have this problem (for now ) : At the "create" state i define this.collisionCircle = new Phaser.Circle(0,0,2);this.playerRectangle = new Phaser.Rectangle (0,0,0,0);this.player = game.add.sprite(game.world.centerX, game.world.height-80,'player');game.physics.arcade.enable(this.player);this.player.body.drag.set(550);this.circleCenter = new Phaser.Point(0,0);this.PointToGo = new Phaser.Point(0,0);At the "update" step i havecollisionCircle.setTo(mycircle.center_x,mycircle.center_y,50);if ((Phaser.Circle.intersectsRectangle(collisionCircle,playerRecta