/**
 * 用户头像显示容器
 */ class PortraitContainer extends egret . DisplayObjectContainer { public constructor ( user , index , isLandlord ) { super ( ) ; let pc = RES . getRes ( "layout_json" ) . portraitContainer ; this . x = pc . x ; this . y = pc . y ; this . width = pc . width ; this . height = pc . height ; let playerName = new TextTip ( user . getName ( ) , 0 , 100 , 16 ) ; playerName . width = 100 ; this . addChild ( playerName ) ; if ( isLandlord ) { let playerName = new TextTip ( "地主" , 100 , 0 , 32 ) ; playerName . width = 100 ; this . addChild ( playerName ) ; } this . show ( user . getSex ( ) , index ) ; } private show ( sex , index ) { let portrait = new DefaultPortrait ( sex , index , 0 , 0 , 100 , 100 ) ; this . addChild ( portrait ) ; } }