summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/rectangles/engine')
-rw-r--r--public/assets/javascripts/rectangles/engine/rooms/_walls.js28
1 files changed, 26 insertions, 2 deletions
diff --git a/public/assets/javascripts/rectangles/engine/rooms/_walls.js b/public/assets/javascripts/rectangles/engine/rooms/_walls.js
index 5c16ce6..fe5913d 100644
--- a/public/assets/javascripts/rectangles/engine/rooms/_walls.js
+++ b/public/assets/javascripts/rectangles/engine/rooms/_walls.js
@@ -160,7 +160,19 @@
}.bind(this)
img.src = background.src
img.complete && img.onload()
- }
+ },
+ floor: function(background){
+ Walls.floors.forEach(function(floor){
+ if (floor.ceiling) return
+ floor.wallpaper(background)
+ })
+ },
+ ceiling: function(background){
+ Walls.floors.forEach(function(floor){
+ if (! floor.ceiling) return
+ floor.wallpaper(background)
+ })
+ },
}
base.clearWallpaper = {
@@ -168,7 +180,19 @@
Walls.list.forEach(function(wall){
wall.wallpaper("none")
})
- }
+ },
+ floor: function(){
+ Walls.floors.forEach(function(floor){
+ if (floor.ceiling) return
+ wall.wallpaper("none")
+ })
+ },
+ ceiling: function(){
+ Walls.floors.forEach(function(floor){
+ if (! floor.ceiling) return
+ wall.wallpaper("none")
+ })
+ },
}
base.setColor = {