diff --git a/assets/anais_spritesheet.png b/assets/anais_spritesheet.png index f0321f1..a31e857 100644 Binary files a/assets/anais_spritesheet.png and b/assets/anais_spritesheet.png differ diff --git a/assets/char_cursor.png b/assets/char_cursor.png index 2253971..47909a1 100644 Binary files a/assets/char_cursor.png and b/assets/char_cursor.png differ diff --git a/assets/nicole_spritesheet.png b/assets/nicole_spritesheet.png new file mode 100644 index 0000000..97ca5a8 Binary files /dev/null and b/assets/nicole_spritesheet.png differ diff --git a/assets/penny_spritesheet.png b/assets/penny_spritesheet.png index dc69e1d..d6647dc 100644 Binary files a/assets/penny_spritesheet.png and b/assets/penny_spritesheet.png differ diff --git a/src/main.js b/src/main.js index d5a446d..e6d42dc 100644 --- a/src/main.js +++ b/src/main.js @@ -42,7 +42,7 @@ let config = { physics: { default: "arcade", arcade: { - debug: true, + // debug: true, // gravity not needed // gravity: { // x: 0, diff --git a/src/prefabs/Enemy.js b/src/prefabs/Enemy.js index 42a30af..b70093e 100644 --- a/src/prefabs/Enemy.js +++ b/src/prefabs/Enemy.js @@ -4,7 +4,7 @@ class Enemy extends Phaser.GameObjects.Sprite { scene.add.existing(this) scene.physics.add.existing(this) - this.body.setImmovable = true; + this.body.setImmovable(true) // setting enemy properties this.health = health this.name = name @@ -72,7 +72,7 @@ class DefaultState extends State { if (scene.selectionMenu.attackingPlayer){ // console.log(scene.selectionMenu.attackingPlayer.projectile) - scene.physics.add.collider(scene.selectionMenu.attackingPlayer.projectile, enemy, scene.selectionMenu.attackingPlayer.projectile.handleCollision, null, scene) + scene.physics.add.collider(scene.selectionMenu.attackingPlayer.projectile, enemy, scene.selectionMenu.attackingPlayer.projectile.handleCollision.bind(scene.selectionMenu.attackingPlayer.projectile), null, scene) } } diff --git a/src/prefabs/Projectile.js b/src/prefabs/Projectile.js index c62c1a7..c8b81ff 100644 --- a/src/prefabs/Projectile.js +++ b/src/prefabs/Projectile.js @@ -56,10 +56,12 @@ class Projectile extends Phaser.Physics.Arcade.Sprite{ handleCollision(){ console.log("HANDLING COLLISION") - // this.x = this.startX - console.log("original x = " + this.x + "set x " + this.startX) + this.x = this.startX + // console.log("original x = " + this.x + "set x " + this.startX) // this.resetProj(this.startX) + + // set up animations for projectile LATER return true } diff --git a/src/scenes/Menu.js b/src/scenes/Menu.js index 4f003f5..5e09a87 100644 --- a/src/scenes/Menu.js +++ b/src/scenes/Menu.js @@ -34,9 +34,14 @@ class Menu extends Phaser.Scene{ frameHeight: 35 }) this.load.spritesheet('penny', 'penny_spritesheet.png', { - frameWidth: 39, - frameHeight: 59 + frameWidth: 43, + frameHeight: 60 }) + this.load.spritesheet('nicole', 'nicole_spritesheet.png', { + frameWidth: 40, + frameHeight: 72 + }) + this.load.spritesheet('ANAIS_projectile', 'sci_proj_spritesheet.png', { frameWidth: 16, frameHeight: 16