
Destroy Block
By:
TheDuceCat on
Dec 4th, 2011 | syntax:
None | size: 0.46 KB | hits: 10 | expires: Never
public void destroyBlock(int x, int y) {
int blockX = x / (int) gameScale / 16 + (int) (Math.floor(camera.getLocation().x) / 16);
int blockY = y / (int) gameScale / 16 + 1 + (int) (Math.floor(camera.getLocation().y) / 16);
System.out.println("x: " + x + " y: " + y);
System.out.println("bx: " + blockX + " by: " + blockY);
columns.get(blockX).setBlock(128 - blockY, new Air(blockX * 16 - camera.getLocation().x, blockY * 16 - camera.getLocation().y));
}