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

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

@@ -13,8 +13,9 @@ import { EquipSpecialAttr } from "../common/config/Equips";
import { FightSet, getExpDrops, getStoneDrops, TooltipTypes } from "../common/config/Mission";
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
import { EnhancementType } from "../common/config/LevelUp";
import { MonsterDropManager } from "../common/config/Items";
import { Items, MonsterDropManager } from "../common/config/Items";
import { HeroInfo } from "../common/config/heroSet";
import { finishCurrGuide, GuideConfig, startGuide } from "../common/config/Guide";
const { ccclass, property } = _decorator;
@@ -124,7 +125,6 @@ export class HeroViewComp extends CCComp {
onLoad() {
this.as = this.getComponent(HeroSpine);
//console.log("[HeroViewComp]:hero view comp ",this.FIGHTCON)
this.on(GameEvent.HeroLvUp,this.to_update_lv,this)
this.on(GameEvent.FightEnd,this.do_fight_end,this)
const collider = this.node.getComponent(BoxCollider2D);
this.scheduleOnce(()=>{
@@ -273,13 +273,18 @@ export class HeroViewComp extends CCComp {
}
do_drop(){
let drop_item=MonsterDropManager.calculateMonsterDrops(this.hero_uuid,smc.data.mission,1)
startGuide(2)
this.scheduleOnce(()=>{
if(smc.guides[2]==0&&smc.current_guide==2&&smc.guides[1]==1) {
drop_item.push({item_uuid:Items[1008].uuid,count:20})
}
},0.1)
let {exp,gold,diamond}=MonsterDropManager.calculateBaseResourceDrops(HeroInfo[this.hero_uuid].quality,smc.data.mission,this.BUFFS.length)
oops.message.dispatchEvent(GameEvent.MonDead,{mon_uuid:this.hero_uuid,drops:drop_item,game_data:{exp:exp, gold:gold, diamond:diamond}})
if(drop_item.length>0){
for(let i=0;i<drop_item.length;i++){
let d_item=drop_item[i]
smc.addItem(d_item.item_uuid,d_item.count)
}
}
if(exp>0){
@@ -583,16 +588,6 @@ export class HeroViewComp extends CCComp {
}
to_update_lv(event:string,data:any){
if(this.fac==FacSet.MON) return
// console.log("[HeroViewComp]:升级",this.BUFFCOMP)
if(this.hero_uuid!=data.uuid) return
this.apply_buff(BuffAttr.HP_MAX,data.hp)
this.apply_buff(BuffAttr.AP,data.ap)
this.BUFFCOMP.lv_up()
// this.BUFFCOMP.tooltip(TooltipTypes.lvup)
}
/** 显示伤害数字 */
showDamage(damage: number, isCrit: boolean,anm:string="atked") {