2023-02-06 22:06:27 +08:00

35 lines
739 B
TypeScript

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) {
this._sortingPriority = value;
this._renderEntity.sortingPriority = value;
},
enumerable: true
});
}