//=====================机械王座============================================== if (this._actor._kaiguan){//条件变量 // this.drawIcon( 3, x + 350, y, 60, 'right');//图标显示 this.changeTextColor('rgba(0,255,0,255)'); this.drawText("机械王座:", x + 800, y +130, 100, 'right');//文字显示 this.changeTextColor('rgba(255,0,0,255)'); this.drawText( + this._actor._bianliang +"%净化率", x + 850, y +130, 200, 'right'); //变量显示 } else{ this.changeTextColor('rgba(0,255,0,255)'); this.drawText("机械王座:", x + 800, y +130, 100, 'right'); // this.drawText("之塔:", x + 680, y -20, 100, 'right'); this.changeTextColor('rgba(255,0,0,255)'); this.drawText("关闭", x + 850, y +130, 100, 'right'); }; //=============================================================================