class Button extends egret . Bitmap { /**
     * 创建一个标准的按钮对象
     *
     * x 按钮的x坐标
     * y 按钮的y坐标
     * w 按钮的宽
     * h 按钮的高
     */ public constructor ( type , x , y , w , h ) { let buttonName = "button_" + type + "_png" ; super ( RES . getRes ( buttonName ) ) ; this . x = x ; this . y = y ; this . width = w ; this . height = h ; this . name = type + x ; } }