const ItemBase = require( "cmp.item.base" ); cc.Class( { extends: ItemBase, properties: { }, // 单设:品质 setQuality: function( _qa ) { if ( this.nodBG ) { let qa = null; if ( nx.dt.numPositive( _qa ) ) { qa = cc.path.join( "coms/images", "bg_qa" + _qa ); } nx.gui.setSpriteFrame( this.nodBG, "", qa ); if( !qa ){ nx.gui.getComponent( this.nodBG, "", cc.Sprite ).curKey = ""; } } // if ( this.nodName ) { // let color = BackPackConst.quality_color( _qa ); // let cur = this.nodName.node.color; // cur.fromHEX( color ); // this.nodName.node.color = cur; // } }, } );