引导系统基本完成,开始制作 引导步骤

This commit is contained in:
2025-08-24 23:40:37 +08:00
parent d693499397
commit 6a29821a7b
46 changed files with 11593 additions and 8594 deletions

View File

@@ -5,6 +5,7 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/O
import { smc } from "../common/SingletonModuleComp";
import { GameEvent } from "../common/config/GameEvent";
import { HeroPageComp } from "./HeroPageComp";
import { finishCurrGuide, GuideConfig, startGuide } from "../common/config/Guide";
const { ccclass, property } = _decorator;
@@ -13,7 +14,6 @@ const { ccclass, property } = _decorator;
@ecs.register('MissionHome', false)
export class MissionHomeComp extends CCComp {
protected onLoad(): void {
this.on(GameEvent.MissionEnd,this.mission_end,this)
}
@@ -21,8 +21,26 @@ export class MissionHomeComp extends CCComp {
start() {
this.home_active()
}
onEnable(){
this.endGuide()
this.startNextGuide(); // 启动第一个引导
startGuide(1)
startGuide(2)
}
/** 启动下一个引导 */
private startNextGuide() {
// 检查是否还有未完成的引导
if(smc.guides[GuideConfig[0].key]==0){
oops.message.dispatchEvent(GameEvent.GuideStart,0)
}
}
private endGuide(){
// finishCurrGuide(0)
}
start_mission() {
finishCurrGuide(1)
oops.message.dispatchEvent(GameEvent.MissionStart, {})
this.node.active=false;
}
@@ -69,6 +87,7 @@ export class MissionHomeComp extends CCComp {
break
case "heros":
page_heros.active=true
finishCurrGuide(2)
let page_heros_com=page_heros.getComponent(HeroPageComp)!
page_heros_com.update_heros()
btn_heros.getChildByName("act").active=true