class StartScene extends egret . DisplayObjectContainer { private user : User ; public constructor ( user ) { super ( ) ; this . user = user ; this . show ( ) ; } private show ( ) { let bg = new egret . Bitmap ( RES . getRes ( "startBgImg_png" ) ) ; bg . name = "bgImg" ; this . addChild ( bg ) ; let button = new egret . Bitmap ( RES . getRes ( "button_begin_png" ) ) ; button . touchEnabled = true ; button . addEventListener ( egret . TouchEvent . TOUCH_TAP , this . startGame , this ) ; button . name = "button" ; button . x = 700 ; button . y = 300 ; this . addChild ( button ) ; } /**
     * 点击开始游戏按钮,移除开始界面，进入游戏大厅
     */ private startGame ( evt ) { let gameHall = new GameHall ( this . user ) ; gameHall . name = "gameHall" ; this . parent . addChild ( gameHall ) ; this . parent . removeChild ( this ) ; } }