Add constructor to AnimationPlayer