This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-10-26 03:06:44 +08:00
parent cb70ba12c7
commit 09225a33c7
158 changed files with 26537 additions and 639 deletions

View File

@@ -1,9 +1,10 @@
import { Vec2 } from "cc";
import GObject from "./base/GObject";
import { v3 } from "cc";
import { JNFrameInfo } from "../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
export default class GBaseMode extends GObject<{}> {
export default class GBaseMode<T> extends GObject<T> {
//添加对象到场景中
addGObject(obj: GObject<{}>,pos?:Vec2){
@@ -14,5 +15,14 @@ export default class GBaseMode extends GObject<{}> {
}
}
onSyncUpdate(dt: number,frame:JNFrameInfo, input?: T) {
//重置 场景中的层级
[...this.node.children].sort((node1,node2) => node2.worldPosition.y - node1.worldPosition.y).forEach((node,index) => {
node.setSiblingIndex(index);
})
}
}