This commit is contained in:
2025-09-11 12:31:10 +08:00
parent 5accb0b507
commit f3cfcecadf
24 changed files with 3379 additions and 1283 deletions
+16 -17
View File
@@ -4,23 +4,22 @@ import GameRootUI from "../Main/Common/GameRootUI";
const { ccclass, property } = _decorator;
//主界面场景
@ccclass('MainScene')
@ccclass("MainScene")
export class MainScene extends Component {
@property(Node)
UIRoot: Node = null;
@property(Node)
UILayerMod: Node = null;
@property(Camera)
MainCamera: Camera = null;
@property(Node)
UIRoot: Node = null
@property(Node)
UILayerMod: Node = null
@property(Camera)
MainCamera: Camera = null
start() {
//每个场景必须添加的
let gameRootUI = this.node.getComponent(GameRootUI)
if (!gameRootUI){
gameRootUI = this.node.addComponent(GameRootUI)
gameRootUI.InitByCreate(this.UIRoot, this.UILayerMod, "ThemePanel");
}
GameRootUI.MainCamera = this.MainCamera
start() {
//每个场景必须添加的
let gameRootUI = this.node.getComponent(GameRootUI);
if (!gameRootUI) {
gameRootUI = this.node.addComponent(GameRootUI);
gameRootUI.InitByCreate(this.UIRoot, this.UILayerMod, "MainPanel");
}
}
GameRootUI.MainCamera = this.MainCamera;
}
}