public void renderUnit(Unit u){
		
		for(int y = 0; y < u.sprite.SIZE; y++){
			int ya = y + (int) u.y - yOffset;
			for(int x = 0; x < u.sprite.SIZE; x++){
				int xa = x + (int) u.x - xOffset;
				if(xa < 0 || xa >= width || ya < 0 || ya >= height) continue;
				pixels[xa + ya * width] = u.sprite.pixels[x + y * u.sprite.SIZE];
			}
		}
		
	}