Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ..
- public class WaterTile extends Tile {
- private int anim;
- public WaterTile(Sprite sprite) {
- super(sprite);
- }
- public void render(int x, int y, Screen screen) {
- screen.renderTile(x << 4, y << 4, this);
- }
- public void update() {
- if (anim < 1000000)
- anim++;
- else
- anim = 0;
- if(anim % 30 > 20) {
- sprite = Sprite.water_;
- } else {
- sprite = Sprite.water;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment