/**
 * 显示其他玩家的明牌
 */ class PukerVerticalContainer extends egret . DisplayObjectContainer { /**
     * 竖着排列的牌，用于显示对手的明牌
     * arrays 扑克id的数组
     * x 扑克的x坐标
     */ public constructor ( arrays , isLeft ) { super ( ) ; let pc = RES . getRes ( "layout_json" ) . pukerVerticalContainer ; if ( isLeft ) { this . x = pc . leftX ; } else { this . x = pc . rightX ; } this . y = pc . y ; this . width = pc . width ; this . height = pc . height ; this . show ( arrays ) ; } /**
     * 横着排列
     */ private show ( arrays ) { let p = RES . getRes ( "layout_json" ) . puker ; let x = 0 ; let y = 0 ; for ( var i = 0 ; i < arrays . length ; i ++ ) { if ( i >= 10 ) { y = 40 ; } if ( x >= 10 ) { x = x - 10 ; } let puker = new Puker ( arrays [ i ] , x * p . pukerSmallSpace , y , p . pukerSmallWidth , p . pukerSmallHeight ) ; x ++ ; this . addChild ( puker ) ; } } /**
     * 竖着排列
     */ private show1 ( arrays ) { let p = RES . getRes ( "layout_json" ) . puker ; let x = 0 ; let y = 0 ; for ( var i = 0 ; i < arrays . length ; i ++ ) { if ( i >= 10 ) { x = p . pukerSmallHeight * 0.3 ; } if ( y >= 10 ) { y = y - 10 ; } let puker = new Puker ( arrays [ i ] , x , y * p . pukerSmallSpace , p . pukerSmallWidth , p . pukerSmallHeight ) ; y ++ ; this . addChild ( puker ) ; } } }