X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=core%2Fsrc%2Fru%2Fdeadsoftware%2Fcavecraft%2Fgame%2FGameWorld.java;h=c4655bf157c732368ec685c085af2be42ba9f819;hb=103459785743a8485af69863d65ad1b1a2410ab0;hp=97d05cb2d41f5767cd88482f27c238453da61f41;hpb=e74dcdefc780916a98fa50730905cc14699769f8;p=cavedroid.git diff --git a/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java b/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java index 97d05cb..c4655bf 100644 --- a/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java +++ b/core/src/ru/deadsoftware/cavecraft/game/GameWorld.java @@ -2,11 +2,13 @@ package ru.deadsoftware.cavecraft.game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.math.Vector2; +import com.badlogic.gdx.utils.ArrayMap; import ru.deadsoftware.cavecraft.Items; public class GameWorld { private final int WIDTH, HEIGHT; + private int[][] foreMap; private int[][] backMap; @@ -64,12 +66,15 @@ public class GameWorld { } public void placeToForeground(int x, int y, int value) { - if (getForeMap(x,y) == 0 || value == 0) setForeMap(x,y,value); + if (getForeMap(x,y) == 0 || value == 0) { + setForeMap(x,y,value); + } } public void placeToBackground(int x, int y, int value) { - if (value==0 || (getBackMap(x,y) == 0 && !Items.BLOCKS.getValueAt(value).foreground)) - setBackMap(x,y,value); + if (value==0 || (getBackMap(x,y) == 0 && !Items.BLOCKS.getValueAt(value).foreground)) { + setBackMap(x,y,value); + } } public Vector2 getSpawnPoint() {