public void update(long elapsedTime) {
        // select the correct Animation
        Animation newAnim = anim;
        if (state == STATE_DYING && iLado==1) {
            newAnim = left;
        }
        else if (state == STATE_DYING && iLado == 2) {
            newAnim = right;
        }
       
        // update the Animation
        if (anim != newAnim ) {
            anim = newAnim;
            anim.start();
        }
        else {
            anim.update(elapsedTime);
        }
        // update to "dead" state
        stateTime += elapsedTime;
        if (state == STATE_DYING && stateTime >= 300) {
            setState(STATE_DEAD);
        }
    }