35 lines
739 B
TypeScript
Raw Normal View History

2023-02-06 12:06:34 +08:00
import { UIRenderer } from "cc";
declare module 'cc' {
interface UIRenderer {
/**
* - private
*/
_sortingPriority:number;
/**
*
*/
sortingPriority:number;
/**
*
*/
sortingOpacity:number;
}
}
if(!('sortingPriority' in UIRenderer.prototype)){
Object.defineProperty(UIRenderer.prototype, 'sortingPriority', {
get: function() {
return this._sortingPriority;
},
set: function(value) {
2023-02-06 22:06:27 +08:00
this._sortingPriority = value;
this._renderEntity.sortingPriority = value;
2023-02-06 12:06:34 +08:00
},
enumerable: true
});
}