mirror of
https://github.com/danbee/invaders
synced 2025-03-04 08:39:08 +00:00
Reduce bullet pool to 3. Tweak bullet start position.
This commit is contained in:
parent
8fd1db7be8
commit
c763d1427b
@ -24,7 +24,7 @@ function create () {
|
||||
bullets = game.add.group();
|
||||
bullets.enableBody = true;
|
||||
bullets.physicsBodyType = Phaser.Physics.ARCADE;
|
||||
bullets.createMultiple(5, 'bullet');
|
||||
bullets.createMultiple(3, 'bullet');
|
||||
bullets.setAll('anchor.x', 0.5);
|
||||
bullets.setAll('anchor.y', 1);
|
||||
bullets.setAll('checkWorldBounds', true);
|
||||
@ -81,7 +81,7 @@ function fireBullet () {
|
||||
|
||||
if (bullet) {
|
||||
// And fire it
|
||||
bullet.reset(player.x, player.y + 8);
|
||||
bullet.reset(player.x, player.y - 16);
|
||||
bullet.body.velocity.y = -400;
|
||||
bullet.body.velocity.x = player.body.velocity.x / 4
|
||||
bulletTime = game.time.now + 500;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user