diff --git a/css/main.css b/css/main.css index a953d85..74c3136 100644 --- a/css/main.css +++ b/css/main.css @@ -15,7 +15,8 @@ body { border: 1px, solid, black; border: solid; border-color: white; - background-image: url(../images/fliesen.png); + background-image: url(../images/inventorybg.png); + background-position: bottom 0px right 0px; } #info { diff --git a/images/inventorybg.png b/images/inventorybg.png new file mode 100644 index 0000000..09792d3 Binary files /dev/null and b/images/inventorybg.png differ diff --git a/images/items/coal.png b/images/items/coal.png index 05847df..b356728 100644 Binary files a/images/items/coal.png and b/images/items/coal.png differ diff --git a/images/items/log.png b/images/items/log.png new file mode 100644 index 0000000..ee6813d Binary files /dev/null and b/images/items/log.png differ diff --git a/images/tiles/treefarm.pdn b/images/tiles/treefarm.pdn new file mode 100644 index 0000000..4d6977f Binary files /dev/null and b/images/tiles/treefarm.pdn differ diff --git a/images/tiles/treefarm10.png b/images/tiles/treefarm10.png new file mode 100644 index 0000000..c8126a6 Binary files /dev/null and b/images/tiles/treefarm10.png differ diff --git a/images/tiles/treefarm11.png b/images/tiles/treefarm11.png new file mode 100644 index 0000000..dde7107 Binary files /dev/null and b/images/tiles/treefarm11.png differ diff --git a/images/tiles/treefarm12.png b/images/tiles/treefarm12.png new file mode 100644 index 0000000..421a1cd Binary files /dev/null and b/images/tiles/treefarm12.png differ diff --git a/images/tiles/treefarm13.png b/images/tiles/treefarm13.png new file mode 100644 index 0000000..1680d8a Binary files /dev/null and b/images/tiles/treefarm13.png differ diff --git a/images/tiles/treefarm14.png b/images/tiles/treefarm14.png new file mode 100644 index 0000000..5c39375 Binary files /dev/null and b/images/tiles/treefarm14.png differ diff --git a/images/tiles/treefarm15.png b/images/tiles/treefarm15.png new file mode 100644 index 0000000..0584c09 Binary files /dev/null and b/images/tiles/treefarm15.png differ diff --git a/js/baseclasses.js b/js/baseclasses.js index e95707d..1ff9470 100644 --- a/js/baseclasses.js +++ b/js/baseclasses.js @@ -1,20 +1,51 @@ class Tile { - constructor(x, y) { + constructor(x, y, factory) { this.x = x this.y = y this.direction = "right" this.input = new Inventory() this.name = "base" + this.factory = factory + this.currentwork = 0 + this.maxwork = 0 this.texture = { "0": [], "1": [] } + this.images = { + "0": [], + "1": [] + } } - getTexture(fulltime, layer) { - if (this.texture[layer].length == 0) + loadImages(){ + if(this.texture["0"].length>0){ + for(var i=0;i0){ + for(var i=0;i