public GVRAnimation setOnFinish ( GVROnFinish callback ) { mOnFinish = callback ; // Do the instance-of test at set-time, not at use-time mOnRepeat = callback instanceof GVROnRepeat ? ( GVROnRepeat ) callback : null ; if ( mOnRepeat != null ) { mRepeatCount = - 1 ; // loop until iterate() returns false } return this ; }
Set the on - finish callback .