simple invisible wall
element invisible_wall is wall but sets itself to the bg color
This commit is contained in:
parent
7f3e5c7405
commit
9d18b31473
|
|
@ -0,0 +1,20 @@
|
|||
if(!settings) {
|
||||
settings = {}
|
||||
}
|
||||
|
||||
if(!settings.bg) {
|
||||
settings.bg = "#000000"
|
||||
}
|
||||
|
||||
elements.invisible_wall = {
|
||||
color: settings.bg,
|
||||
behavior: behaviors.WALL,
|
||||
tick: function(pixel) {
|
||||
var backgroundColor = hexToRGB(settings.bg);
|
||||
var rgbValue = "rgb("+backgroundColor.r+","+backgroundColor.g+","+backgroundColor.b+")";
|
||||
pixel.color = rgbValue;
|
||||
},
|
||||
hardness: 1,
|
||||
category: "special",
|
||||
state: "solid",
|
||||
};
|
||||
Loading…
Reference in New Issue