public Player(TileMap tileMap, int x, int y) {
        super(tileMap);
        setPos(x, y);
        sWidth = sHeight = 30;
        width = height = 20;
        moveSpeed = 0.3;
        maxSpeed = 1.6;
        stopSpeed = 0.4;
        fallSpeed = 0.15;
        maxFallSpeed = 4.0;
        jumpStart = -4.8;
        stopJumpSpeed = 0.3;
        facingRight = true;
        health = maxHealth = 5;
        fire = maxFire = 2500;
        fireCost = 200;
        fireDamage = 5;
        fireBalls = new ArrayList<FireBall>();
        slashDamage = 8;
        slashRange = 40;
        BufferedImage spritesheet = new Texture("/textures/playersprites.gif").getImage();
        for (int i = 0; i < 7; i++) {
            BufferedImage[] bi = new BufferedImage[numFrames[i]];
            for (int k = 0; k < numFrames[i]; k++) {
                if (i != ATTACK_SLASH) bi[k] = spritesheet.getSubimage(k * sWidth, i * sHeight, sWidth, sHeight);
                else bi[k] = spritesheet.getSubimage(k * sWidth * 2, i * sHeight, sWidth * 2, sHeight);
            }
            sprites.add(bi);
        }
        animation = new Animation();
        currentAction = IDLE;
        animation.setFrames(sprites.get(IDLE));
        animation.setDelay(400);
        hud = new Hud(this);
    }