public void update(long elapsedTime) {
    	//rotation = Math.atan2(this.getVelocityX(), this.getVelocityY());
    	
        // select the correct Animation
        Animation newAnim = anim;
        newAnim = creatureAnim[(int)getRotation()];
        // 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 >= DIE_TIME) {
            setState(STATE_DEAD);
        }
    }