From d8881c866c0f3257dd62ea0e309460f9c6df30ba Mon Sep 17 00:00:00 2001 From: Samantha Date: Mon, 7 Oct 2024 20:28:06 -0400 Subject: [PATCH] added lights --- create1.js | 3 +++ create2.js | 3 +++ create3.js | 3 +++ create4.js | 3 +++ create5.js | 3 +++ main.js | 1 + 6 files changed, 16 insertions(+) diff --git a/create1.js b/create1.js index e48e0fc..46e672f 100644 --- a/create1.js +++ b/create1.js @@ -58,6 +58,9 @@ function create1() { else if (wallkind == 4){ wall.create(j*40+20, i*40+20, "painting4"); } + else if (wallkind == 5){ + wall.create(j*40+20, i*40+20, "wall_light"); + } } //wall.create(j*40+20,i*40+20, "wall"); } diff --git a/create2.js b/create2.js index ea6f5be..70d4237 100644 --- a/create2.js +++ b/create2.js @@ -55,6 +55,9 @@ function create2() { else if (wallkind == 4){ wall.create(j*40+20, i*40+20, "painting4"); } + else if (wallkind == 5){ + wall.create(j*40+20, i*40+20, "wall_light"); + } } //wall.create(j*40+20,i*40+20, "wall"); } diff --git a/create3.js b/create3.js index 3a8f8b3..56d277e 100644 --- a/create3.js +++ b/create3.js @@ -56,6 +56,9 @@ function create3() { else if (wallkind == 4){ wall.create(j*40+20, i*40+20, "painting4"); } + else if (wallkind == 5){ + wall.create(j*40+20, i*40+20, "wall_light"); + } } //wall.create(j*40+20,i*40+20, "wall"); } diff --git a/create4.js b/create4.js index 3d1f1fc..0404b11 100644 --- a/create4.js +++ b/create4.js @@ -64,6 +64,9 @@ function create4() { else if(arr4[i][j]==4){ jewel = this.physics.add.sprite(j*40+20,i*40+20, "jewel").setScale(0.125); } + else if (wallkind == 5){ + wall.create(j*40+20, i*40+20, "wall_light"); + } } } diff --git a/create5.js b/create5.js index effca13..ce2d217 100644 --- a/create5.js +++ b/create5.js @@ -55,6 +55,9 @@ function create5() { else if (wallkind == 4){ wall.create(j*40+20, i*40+20, "painting4"); } + else if (wallkind == 5){ + wall.create(j*40+20, i*40+20, "wall_light"); + } } //wall.create(j*40+20,i*40+20, "wall"); } diff --git a/main.js b/main.js index 88fafb4..8f178fd 100644 --- a/main.js +++ b/main.js @@ -73,6 +73,7 @@ function preload() { this.load.image("blueT", "assets/tileBlue.png"); this.load.image("whiteT", "assets/tileWhite.png"); this.load.image("wall", "assets/WallBox.png"); + this.load.image("wall_light", "assets/WallBoxLight.png"); this.load.image("wallS", "assets/WallBoxSlash.png"); this.load.image("wallSR", "assets/WallBoxSlashReverse.png"); this.load.image("wallDS", "assets/WallBoxDoubleSlash.png");