class LoadingUI extends egret . Sprite implements RES . PromiseTaskReporter { public constructor ( ) { super ( ) ; this . createView ( ) ; } private textField : egret . TextField ; private createView ( ) { this . textField = new egret . TextField ( ) ; this . addChild ( this . textField ) ; this . textField . y = 300 ; this . textField . width = 480 ; this . textField . height = 100 ; this . textField . textAlign = "center" ; } public onProgress ( current , total ) { this . textField . text = `Loading...${ current }/${ total }` ; } }