public AnimatedSprite(Sprite[] sprites, int delay) {
        this.sprites = sprites;
        this.sprite = sprites[0];
        this.currentFrame = 0;
        this.lastTime = System.currentTimeMillis();
        this.delay = delay;
    }