public static void renderSpritesheet(Screen screen) { for (int i = 0; i < Sprites.getLength(Sprites.SPRITE); i++) { for (int j = 0; j < Sprites.getLength(Sprites.SPRITE, i); j++) { screen.render(Sprites.getSprite(Sprites.SPRITE, i, j), i * 32, j * 32); } } }
public void render(Screen screen, int x, int y, int shadow) { screen.render(frames[shadow + cf], x, y); if (animated) if (System.currentTimeMillis() - lt > ci) { if (cf >= frames.length - 1) cf = 0; else cf++; lt += ci; } }