mirror of
https://gitee.com/nomat/lcc-ui-sorting-group-demo.git
synced 2025-01-22 11:11:03 +00:00
34 lines
684 B
TypeScript
34 lines
684 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;
|
||
|
},
|
||
|
enumerable: true
|
||
|
});
|
||
|
}
|