feat: group 1.0.0

This commit is contained in:
zzc
2026-05-12 06:46:31 +08:00
parent 493b4709bc
commit 2fc90c1219
55 changed files with 23561 additions and 1767 deletions

View File

@@ -1,5 +1,7 @@
import { _decorator, Component, director, Node } from "cc";
import { _decorator, Color, Component, director, Node } from "cc";
import AudioEffect from "../libs/AudioEffect";
import { GlobalData } from "../config/GlobalData";
import Common from "../libs/Common";
const { ccclass, property } = _decorator;
@ccclass("HomeSceneCon")
@@ -11,6 +13,8 @@ export class HomeSceneCon extends Component {
start() {
// 监听滑动区域事件
this.swipeNode.on(Node.EventType.TOUCH_START, this.goToGameScene, this);
// 设置页面的背景颜色
this.setPageBackgroundColor();
}
// 跳转到游戏场景
@@ -44,5 +48,18 @@ export class HomeSceneCon extends Component {
});
}
// 设置页面的背景颜色
setPageBackgroundColor() {
// 获取当前小恐龙信息
const dinoInfo = GlobalData.currentDinoInfo;
// 获取背景色
const backgroundColor = new Color(dinoInfo.bgColor);
// 设置页面的背景颜色
Common.setPageBackgroundColor(
this.node.getChildByName("bg"),
backgroundColor,
);
}
update(deltaTime: number) {}
}