diff --git a/Assets/Smoke.pdn b/Assets/Smoke.pdn new file mode 100644 index 0000000..e24f638 Binary files /dev/null and b/Assets/Smoke.pdn differ diff --git a/GraphicsEngine/GUI.js b/GraphicsEngine/GUI.js index e52c1ee..d704106 100644 --- a/GraphicsEngine/GUI.js +++ b/GraphicsEngine/GUI.js @@ -13,7 +13,7 @@ class GUI render() { this.renderControler.renderBackground(); - this.renderControler.renderMap(this.fases[this.curentFase].canDrawMap,); + this.renderControler.renderMap(this.fases[this.curentFase].canDrawMap,this.controler.Offset); this.renderControler.renderGui(this.fases[this.curentFase].GuiElements); } switchFase(index) diff --git a/GraphicsEngine/RenderControler.js b/GraphicsEngine/RenderControler.js index 996b94e..bee3731 100644 --- a/GraphicsEngine/RenderControler.js +++ b/GraphicsEngine/RenderControler.js @@ -5,17 +5,45 @@ class RenderControler { this.sprites = sprites; this.canvases=canvases; this.engine = engine; + this.worldSize = this.engine.getWorldSize(); } renderSprite(type, variant, x, y) { this.sprites[type][Math.abs(variant) % this.sprites[type].length].draw(this.canvases,"mainCanvas", x, y); //Отрисовка справйта } - renderMap(canDo) + + renderMap(canDo,offset) { if (canDo) { - //for (let i = Number.max(0,);i