去掉大部分 调试信息

This commit is contained in:
2025-08-21 14:33:42 +08:00
parent 92faa0fe09
commit 213149881c
27 changed files with 164 additions and 164 deletions

View File

@@ -91,7 +91,7 @@ export class CardComp extends CCComp {
}, 0.1);
}
func_select(args: any){
console.log("[cardcomp]:card func_select",args)
// console.log("[cardcomp]:card func_select",args)
this.c_type=cardType.SPECIAL
this.c_uuid=args.uuid
this.node.getChildByName("show").active=false
@@ -116,7 +116,7 @@ export class CardComp extends CCComp {
random_select(){
let card =getRandomCardUUID() //随机获取卡牌类型
console.log("[cardcomp]:rad 开始请求卡牌",card)
// console.log("[cardcomp]:rad 开始请求卡牌",card)
switch(card.type){
case cardType.EQUIP:
this.equip_select(card)
@@ -137,7 +137,7 @@ export class CardComp extends CCComp {
sprite.spriteFrame = atlas.getSpriteFrame(TalentList[uuid].path);
});
show.getChildByName("info").getComponent(Label).string=TalentList[uuid].info
console.log("[cardcomp]:show_talent",TalentList[uuid],show)
// console.log("[cardcomp]:show_talent",TalentList[uuid],show)
}
show_skill(uuid:number){
let show=this.node.getChildByName("show")
@@ -163,7 +163,7 @@ export class CardComp extends CCComp {
// console.error("[CardComp]: 加载骨骼数据失败:", err);
// return;
// }
// console.log("[CardComp]: 加载骨骼数据成功:", skeleton)
// // console.log("[CardComp]: 加载骨骼数据成功:", skeleton)
// // 检查节点是否仍然存在
// const maskNode = show.getChildByName("mask");
// if (!maskNode) {
@@ -267,7 +267,7 @@ export class CardComp extends CCComp {
show.getChildByName("mask").getChildByName("wbg").active=true
break
case EquipType.ACCESSORY:
console.log("[cardcomp]:装备卡 饰品")
// console.log("[cardcomp]:装备卡 饰品")
break
}
@@ -330,32 +330,32 @@ export class CardComp extends CCComp {
oops.message.dispatchEvent(GameEvent.CardsClose)
break
case cardType.SKILL:
console.log("[cardcomp]:use_card 技能卡")
// console.log("[cardcomp]:use_card 技能卡")
oops.message.dispatchEvent(GameEvent.UseSkillCard,{uuid:this.c_uuid,slot:this.skill_slot})
oops.message.dispatchEvent(GameEvent.CardsClose)
this.skill_slot="skill1"
break
case cardType.EQUIP:
console.log("[cardcomp]:use_card 装备卡")
// console.log("[cardcomp]:use_card 装备卡")
// if(!this.cost_gold_check()) return
oops.message.dispatchEvent(GameEvent.EquipAdd,{uuid:this.c_uuid,type:EquipInfo[this.c_uuid].type,slot:this.equip_slot})
oops.message.dispatchEvent(GameEvent.CardsClose)
break
case cardType.SPECIAL:
console.log("[cardcomp]:use_card 功能卡")
// console.log("[cardcomp]:use_card 功能卡")
// if(!this.cost_gold_check()) return
oops.message.dispatchEvent(GameEvent.UseSpecialCard,{uuid:this.c_uuid})
oops.message.dispatchEvent(GameEvent.CardsClose)
break
case cardType.ENHANCEMENT:
console.log("[cardcomp]:use_card 强化卡",this.enhancement_data,smc.enhancements)
// console.log("[cardcomp]:use_card 强化卡",this.enhancement_data,smc.enhancements)
oops.message.dispatchEvent(GameEvent.UseEnhancement,this.enhancement_data)
smc.enhancements[this.enhancement_data.type]=this.enhancement_data.lv
console.log("[cardcomp]:use_card 强化卡",this.enhancement_data,smc.enhancements)
// console.log("[cardcomp]:use_card 强化卡",this.enhancement_data,smc.enhancements)
oops.message.dispatchEvent(GameEvent.CardsClose)
break
case cardType.TALENT:
console.log("[cardcomp]:use_card 天赋卡",this.c_uuid)
// console.log("[cardcomp]:use_card 天赋卡",this.c_uuid)
oops.message.dispatchEvent(GameEvent.UseTalentCard,{uuid:this.c_uuid,slot:this.talent_slot})
oops.message.dispatchEvent(GameEvent.CardsClose)
break

View File

@@ -23,7 +23,7 @@ export class CardControllerComp extends CCComp {
}
show_info(uuid:number,type:number){
console.log("show_info",uuid)
// console.log("show_info",uuid)
}
protected update(dt: number): void {

View File

@@ -73,36 +73,36 @@ export class CardsCompComp extends CCComp {
this.cancel_btn.active=false
switch(e){
case GameEvent.HeroSelect:
console.log("[CardsComp]:显示英雄选择卡牌",data)
// console.log("[CardsComp]:显示英雄选择卡牌",data)
let title="选择英雄"
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string=title
this.hero_select(data)
break
case GameEvent.HeroSkillSelect:
console.log("[CardsComp]:显示技能选择卡牌")
// console.log("[CardsComp]:显示技能选择卡牌")
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择技能"
this.hero_skill_select(data)
break
case GameEvent.FuncSelect:
console.log("[CardsComp]:显示功能卡牌")
// console.log("[CardsComp]:显示功能卡牌")
this.cancel_btn.active=true
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择卡牌"
this.func_select()
break
case GameEvent.EquipSelect:
console.log("[CardsComp]:显示装备选择卡牌")
// console.log("[CardsComp]:显示装备选择卡牌")
this.cancel_btn.active=true
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择装备"
this.equip_select(data)
break
case GameEvent.EnhancementSelect:
console.log("[CardsComp]:显示强化选择卡牌")
// console.log("[CardsComp]:显示强化选择卡牌")
this.cancel_btn.active=true
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择强化"
this.enhancement_select()
break
case GameEvent.TalentSelect:
console.log("[CardsComp]:显示天赋选择卡牌")
// console.log("[CardsComp]:显示天赋选择卡牌")
this.cancel_btn.active=true
this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择天赋"
this.talent_select(data)
@@ -114,14 +114,14 @@ export class CardsCompComp extends CCComp {
}
talent_select(data:any){
let list=getRandomCardsByType(cardType.TALENT,3,QualitySet.GREEN)
console.log("[CardsComp]:天赋选择卡牌列表",list)
// console.log("[CardsComp]:天赋选择卡牌列表",list)
this.card1c.talent_select(list[0],data)
this.card2c.talent_select(list[1],data)
this.card3c.talent_select(list[2],data)
}
enhancement_select(){
let list=getEnhancement(smc.enhancements,3)
console.log("[CardsComp]:强化选择卡牌列表",smc.enhancements,list)
// console.log("[CardsComp]:强化选择卡牌列表",smc.enhancements,list)
this.card1c.enhancement_select(list[0])
this.card2c.enhancement_select(list[1])
this.card3c.enhancement_select(list[2])
@@ -129,7 +129,7 @@ export class CardsCompComp extends CCComp {
hero_select(data:any){
let list=getHeroList(data.called)
console.log("[CardsComp]:英雄选择卡牌列表",list)
// console.log("[CardsComp]:英雄选择卡牌列表",list)
this.card1c.hero_select(list[0])
this.card2c.hero_select(list[1])
this.card3c.hero_select(list[2])
@@ -145,7 +145,7 @@ export class CardsCompComp extends CCComp {
}else if(data.slot=="skill3"){
list=getRandomCardsByType(cardType.SKILL,3,QualitySet.PURPLE)
}
console.log("[CardsComp]:技能选择卡牌列表",list)
// console.log("[CardsComp]:技能选择卡牌列表",list)
this.card1c.hero_skill_select(list[0],data)
this.card2c.hero_skill_select(list[1],data)
this.card3c.hero_skill_select(list[2],data)
@@ -164,7 +164,7 @@ export class CardsCompComp extends CCComp {
list=getRandomCardsByType(cardType.EQUIP,3,EquipType.ACCESSORY,data.lv)
break
}
console.log("[CardsComp]:装备选择卡牌列表",list)
// console.log("[CardsComp]:装备选择卡牌列表",list)
this.card1c.equip_select(list[0],data)
this.card2c.equip_select(list[1],data)
this.card3c.equip_select(list[2],data)
@@ -172,7 +172,7 @@ export class CardsCompComp extends CCComp {
}
func_select(){
let list=getRandomCardsByType(cardType.SPECIAL,3)
console.log("[CardsComp]:功能选择卡牌列表",list)
// console.log("[CardsComp]:功能选择卡牌列表",list)
this.card1c.func_select(list[0])
this.card2c.func_select(list[1])
this.card3c.func_select(list[2])
@@ -187,7 +187,7 @@ export class CardsCompComp extends CCComp {
/** 添加卡牌展示到队列 */
private addToQueue(e: GameEvent, data?: any) {
console.log("[CardsComp]:添加卡牌到队列", e,data);
// console.log("[CardsComp]:添加卡牌到队列", e,data);
this.cardQueue.push({type: e, data: data});
this.processQueue();
}
@@ -208,16 +208,16 @@ export class CardsCompComp extends CCComp {
close_cards(e:GameEvent,data:any){
switch(e){
case GameEvent.HeroSelect:
console.log("[CardsComp]:关闭英雄选择卡牌")
// console.log("[CardsComp]:关闭英雄选择卡牌")
break
case GameEvent.HeroSkillSelect:
console.log("[CardsComp]:关闭技能选择卡牌")
// console.log("[CardsComp]:关闭技能选择卡牌")
break
case GameEvent.CardRefresh:
console.log("[CardsComp]:关闭随机刷新卡牌")
// console.log("[CardsComp]:关闭随机刷新卡牌")
break
case GameEvent.CardsClose:
console.log("[CardsComp]:关闭所有卡牌")
// console.log("[CardsComp]:关闭所有卡牌")
break
}
this.hide()

View File

@@ -112,7 +112,7 @@ export class GoodsComp extends Component {
}
}
do_buy(){
console.log("[GoodsComp]do_buy",this.goodsData,this.itemData)
// console.log("[GoodsComp]do_buy",this.goodsData,this.itemData)
switch(this.goodsData.type){
case GType.ITEM:
smc.addItem(this.itemData.uuid,this.goodsData.num) //添加物品
@@ -140,7 +140,7 @@ export class GoodsComp extends Component {
}
}
ad_back_false(){
console.log("ad_back_false")
// console.log("ad_back_false")
}
do_ad_back(success:Function,fail:Function){
success.call(this)

View File

@@ -15,7 +15,7 @@ export class HCardUICom extends Component {
slot:number=0
start() {
console.log("[HCardUICom]:start")
// console.log("[HCardUICom]:start")
}
protected onLoad(): void {
oops.message.on(GameEvent.UpdateHero,this.to_update_hero,this)
@@ -25,14 +25,14 @@ export class HCardUICom extends Component {
}
to_update_hero(event:any,args:any){
if(args.uuid==this.h_uuid){
console.log("[HCardUICom]:是我诶:",HeroInfo[args.uuid].name+args.uuid)
// console.log("[HCardUICom]:是我诶:",HeroInfo[args.uuid].name+args.uuid)
this.update_data(args.uuid,{type:this.type})
}
}
update_data(uuid:number,args:any){
this.type=args.type
if(args.slot) this.slot=args.slot
console.log("[HCardUICom]:update_data",uuid,this.type,this.slot,args)
// console.log("[HCardUICom]:update_data",uuid,this.type,this.slot,args)
this.h_uuid=uuid
this.node.getChildByName("in_fight").active=this.check_in_fight()
let hero_data = HeroInfo[uuid]

View File

@@ -16,7 +16,7 @@ export class HInfoComp extends Component {
}
onAdded(args: any) {
console.log("[HInfoComp]:onAdded",args)
// console.log("[HInfoComp]:onAdded",args)
this.update_data(args)
}
update(deltaTime: number) {
@@ -26,7 +26,7 @@ export class HInfoComp extends Component {
this.h_uuid=uuid
let hero_data = HeroInfo[uuid]
console.log("[HInfoComp]:update_data",uuid,hero_data,this.node)
// console.log("[HInfoComp]:update_data",uuid,hero_data,this.node)
let lv=smc.heros[uuid]?.lv??1
let anm_path=hero_data.path
resources.load("game/heros/hero/"+anm_path+"/idle", AnimationClip, (err, clip) => {
@@ -63,7 +63,7 @@ export class HInfoComp extends Component {
this.node.getChildByName("lock").active=lv == 0
this.node.getChildByName("unLock").active=lv == 0
let need_item=unlockHeroCost[HeroInfo[this.h_uuid].quality]
console.log("[HInfoComp]:show_lock item:item_uuid:hero_uuid:hero_data",Items[need_item.i_uuid],need_item.i_uuid,this.h_uuid,HeroInfo[this.h_uuid])
// console.log("[HInfoComp]:show_lock item:item_uuid:hero_uuid:hero_data",Items[need_item.i_uuid],need_item.i_uuid,this.h_uuid,HeroInfo[this.h_uuid])
this.node.getChildByName("unLockNeed").getChildByName("need").getChildByName("has").getComponent(Label).string=smc.items[need_item.i_uuid]??0
this.node.getChildByName("unLockNeed").getChildByName("need").getChildByName("need").getComponent(Label).string=NumberFormatter.formatNumber(need_item.num)

View File

@@ -9,7 +9,7 @@ const { ccclass, property } = _decorator;
@ccclass('HeroPageComp')
export class HeroPageComp extends Component {
start() {
console.log("[HeroPageComp]:start")
// console.log("[HeroPageComp]:start")
}
update(deltaTime: number) {
@@ -17,10 +17,10 @@ export class HeroPageComp extends Component {
}
update_heros(){
let heros=getHeroList()
console.log("[HeroPageComp]:update_heros",heros)
// console.log("[HeroPageComp]:update_heros",heros)
let height= Math.ceil(heros.length/3)*315+30
this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform).setContentSize(720,height)
console.log("[HeroPageComp]:UITransform height",this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform))
// console.log("[HeroPageComp]:UITransform height",this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform))
this.clear_heros()
for(let i=0;i<heros.length;i++){
let hero=heros[i]
@@ -30,7 +30,7 @@ export class HeroPageComp extends Component {
}
}
load_hero(uuid:number){
console.log("[HeroPageComp]:load_hero",uuid)
// console.log("[HeroPageComp]:load_hero",uuid)
let parent=this.node.getChildByName("main").getChildByName("view").getChildByName("heros")
let path = "game/gui/hcard"
const prefab = oops.res.get(path, Prefab);
@@ -46,7 +46,7 @@ export class HeroPageComp extends Component {
clear_heros(){
let parent=this.node.getChildByName("main").getChildByName("view").getChildByName("heros")
let children=parent.children
console.log("[HeroPageComp]:clear_heros",children)
// console.log("[HeroPageComp]:clear_heros",children)
for(let i=0;i<children.length;i++){
children[i].destroy()
}

View File

@@ -25,7 +25,7 @@ export class HeroReadyCom extends Component {
}
update_hero(){
let hero = smc.fight_heros[this.slot]
console.log("[HeroReadyCom]hero",hero,smc.fight_heros,this.slot)
// console.log("[HeroReadyCom]hero",hero,smc.fight_heros,this.slot)
if(hero==0){
this.no_hero()
return
@@ -33,7 +33,7 @@ export class HeroReadyCom extends Component {
this.node.getChildByName("icon").active=true
this.node.getChildByName("add").active=false
let hero_data = HeroInfo[hero]
console.log("[HeroReadyCom]hero_data",smc.fight_heros,hero,smc.fight_heros[this.slot],this.slot,hero_data)
// console.log("[HeroReadyCom]hero_data",smc.fight_heros,hero,smc.fight_heros[this.slot],this.slot,hero_data)
let anm_path=hero_data.path
resources.load("game/heros/hero/"+anm_path+"/idle", AnimationClip, (err, clip) => {
this.node.getChildByName("icon").getComponent(Animation).addClip(clip);

View File

@@ -12,22 +12,22 @@ export class HeroSelectCom extends Component {
}
onAdded(args: any) {
console.log("[HeroSelectCom]:onAdded",args)
// console.log("[HeroSelectCom]:onAdded",args)
this.slot=args.slot
this.update_heros()
}
protected onDisable(): void {
console.log("[HeroSelectCom]:onDisable")
// console.log("[HeroSelectCom]:onDisable")
this.clear_heros()
}
update_heros(){
let heros=smc.getHasHeroUUID()
let width= heros.length*230+20
this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform).setContentSize(width,320)
console.log("[HeroPageComp]:UITransform width",this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform))
// console.log("[HeroPageComp]:UITransform width",this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform))
for(let i=0;i<heros.length;i++){
let hero=heros[i]
console.log("[HeroPageComp]:hero",hero)
// console.log("[HeroPageComp]:hero",hero)
if(hero){
this.load_hero(hero)
}
@@ -37,13 +37,13 @@ export class HeroSelectCom extends Component {
clear_heros(){
let parent=this.node.getChildByName("main").getChildByName("view").getChildByName("heros")
let children=parent.children
console.log("[HeroPageComp]:clear_heros",children)
// console.log("[HeroPageComp]:clear_heros",children)
for(let i=0;i<children.length;i++){
children[i].destroy()
}
}
load_hero(uuid:number){
console.log("[HeroPageComp]:load_hero",uuid)
// console.log("[HeroPageComp]:load_hero",uuid)
let parent=this.node.getChildByName("main").getChildByName("view").getChildByName("heros")
let path = "game/gui/hcard"
const prefab = oops.res.get(path, Prefab);

View File

@@ -16,7 +16,7 @@ export class ItemComp extends Component {
start() {
console.log("[ItemComp]:start");
// console.log("[ItemComp]:start");
}
update(deltaTime: number) {
@@ -35,7 +35,7 @@ export class ItemComp extends Component {
this.type = args.type || 0;
this.slot = args.slot || 0;
this.no_show = args.no_show || false;
console.log("[ItemComp]:update_data", hero_uuid, count, this.type, this.slot, args);
// console.log("[ItemComp]:update_data", hero_uuid, count, this.type, this.slot, args);
// 获取物品配置
const itemData = Items[hero_uuid];
@@ -67,13 +67,13 @@ export class ItemComp extends Component {
*/
private setItemIcon(iconPath: string) {
let path=`gui/items/${iconPath}`
console.log("[ItemComp]: setItemIcon", path);
// console.log("[ItemComp]: setItemIcon", path);
resources.load(path, SpriteFrame, (err, spriteFrame) => {
if (err) {
console.error("[ItemComp]: Failed to load item icon", iconPath, err);
return;
}
console.log("[ItemComp]: setItemIcon", iconPath, spriteFrame);
// console.log("[ItemComp]: setItemIcon", iconPath, spriteFrame);
this.node.getChildByName("icon").getComponent(Sprite)!.spriteFrame = spriteFrame;
});
}
@@ -139,7 +139,7 @@ export class ItemComp extends Component {
* 物品点击事件
*/
do_click() {
console.log("[ItemComp]: Item clicked", this.item_uuid, this.item_count);
// console.log("[ItemComp]: Item clicked", this.item_uuid, this.item_count);
// 根据类型处理不同逻辑
switch (this.type) {
@@ -163,7 +163,7 @@ export class ItemComp extends Component {
*/
private onItemClick() {
// 显示物品信息或执行其他逻辑
console.log("[ItemComp]: Show item info", this.item_uuid);
// console.log("[ItemComp]: Show item info", this.item_uuid);
}
/**
@@ -171,7 +171,7 @@ export class ItemComp extends Component {
*/
private onItemSelect() {
// 处理物品选择逻辑
console.log("[ItemComp]: Item selected", this.item_uuid);
// console.log("[ItemComp]: Item selected", this.item_uuid);
}
/**
@@ -179,7 +179,7 @@ export class ItemComp extends Component {
*/
private onItemUse() {
// 处理物品使用逻辑
console.log("[ItemComp]: Use item", this.item_uuid);
// console.log("[ItemComp]: Use item", this.item_uuid);
}
show_item_info(){
if(this.no_show){

View File

@@ -14,11 +14,11 @@ export class ItemInfoComp extends Component {
private isListening: boolean = false;
start() {
console.log("[ItemInfoComp]:start");
// console.log("[ItemInfoComp]:start");
}
onAdded(args: any) {
console.log("[ItemInfoComp]:onAdded", args);
// console.log("[ItemInfoComp]:onAdded", args);
this.setupTouchListener();
this.update_data(args);
}
@@ -40,7 +40,7 @@ export class ItemInfoComp extends Component {
this.touchListener = input.on(Input.EventType.TOUCH_START, this.onTouchStart, this);
this.isListening = true;
console.log("[ItemInfoComp]: Touch listener setup");
// console.log("[ItemInfoComp]: Touch listener setup");
}
/**
@@ -52,7 +52,7 @@ export class ItemInfoComp extends Component {
this.isListening = false;
this.touchListener = null;
console.log("[ItemInfoComp]: Touch listener removed");
// console.log("[ItemInfoComp]: Touch listener removed");
}
}
@@ -66,7 +66,7 @@ export class ItemInfoComp extends Component {
// 检查触摸点是否在弹窗范围内
if (!this.isTouchInNodeBounds(touchPos, nodePos)) {
console.log("[ItemInfoComp]: Touch outside bounds, closing popup");
// console.log("[ItemInfoComp]: Touch outside bounds, closing popup");
this.closeItemInfo();
}
}
@@ -97,7 +97,7 @@ export class ItemInfoComp extends Component {
* @param args 物品参数 {item_uuid: number, count?: number}
*/
update_data(args: any) {
console.log("[ItemInfoComp]:update_data", args);
// console.log("[ItemInfoComp]:update_data", args);
if (!args || !args.item_uuid) {
console.error("[ItemInfoComp]: Invalid args", args);
@@ -139,13 +139,13 @@ export class ItemInfoComp extends Component {
*/
private setItemIcon(iconPath: string) {
let path=`gui/items/${iconPath}`
console.log("[ItemComp]: setItemIcon", path);
// console.log("[ItemComp]: setItemIcon", path);
resources.load(path, SpriteFrame, (err, spriteFrame) => {
if (err) {
console.error("[ItemComp]: Failed to load item icon", iconPath, err);
return;
}
console.log("[ItemComp]: setItemIcon", iconPath, spriteFrame);
// console.log("[ItemComp]: setItemIcon", iconPath, spriteFrame);
this.node.getChildByName("item").getChildByName("icon").getComponent(Sprite)!.spriteFrame = spriteFrame;
});
}
@@ -268,7 +268,7 @@ export class ItemInfoComp extends Component {
* 关闭物品信息弹窗
*/
closeItemInfo() {
console.log("[ItemInfoComp]: Close item info");
// console.log("[ItemInfoComp]: Close item info");
this.removeTouchListener();
oops.gui.removeByNode(this.node)
}
@@ -277,7 +277,7 @@ export class ItemInfoComp extends Component {
* 使用物品
*/
useItem() {
console.log("[ItemInfoComp]: Use item", this.item_uuid);
// console.log("[ItemInfoComp]: Use item", this.item_uuid);
// 这里可以添加使用物品的逻辑
// 比如消耗物品、触发效果等
}
@@ -286,7 +286,7 @@ export class ItemInfoComp extends Component {
* 丢弃物品
*/
dropItem() {
console.log("[ItemInfoComp]: Drop item", this.item_uuid);
// console.log("[ItemInfoComp]: Drop item", this.item_uuid);
// 这里可以添加丢弃物品的逻辑
// 比如从背包中移除、显示确认对话框等
}

View File

@@ -8,7 +8,7 @@ export class LuckCardComp extends Component {
timer:number=3;
start() {
this.timer=2
console.log("[LuckCardComp]:start")
// console.log("[LuckCardComp]:start")
}
update(deltaTime: number) {

View File

@@ -32,7 +32,7 @@ export class MSkillComp extends CCComp {
this.fight_ready()
}
private master_called(e:any,data:any){
console.log("[EquipSkillComp]: master_called",data)
// console.log("[EquipSkillComp]: master_called",data)
let hero=HeroInfo[data.uuid]
if(hero.skills.length>0){
this.get_skill(null,{slot:this.skill_slot,uuid:hero.skills[this.skill_slot_index]})
@@ -40,7 +40,7 @@ export class MSkillComp extends CCComp {
}
fight_ready(){
console.log("[MSkillComp]: fight_ready",this.node)
// console.log("[MSkillComp]: fight_ready",this.node)
this.node.getChildByName("icon").active=false
this.hide_skill_get(null,"skill1")
this.skill={
@@ -70,7 +70,7 @@ export class MSkillComp extends CCComp {
this.node.getComponent(Animation).stop()
}
spell_skill(){
console.log("spell_skill")
// console.log("spell_skill")
this.skill.cd_time=0
tween(this.node).to(0.1, {scale:v3(1.2,1.2,1)},{onComplete:()=>{
tween(this.node).to(0.2, {scale:v3(1,1,1)}).start()
@@ -84,7 +84,7 @@ export class MSkillComp extends CCComp {
}
get_skill(e:GameEvent,data:any){
console.log("[MSkillComp]: get_skill",data)
// console.log("[MSkillComp]: get_skill",data)
if(data.slot==this.skill_slot||this.skill_slot_index==data.slot){
this.skill.uuid=data.uuid
this.skill.skill_name=SkillSet[data.uuid].name
@@ -110,7 +110,7 @@ export class MSkillComp extends CCComp {
show_info(e:any,data:any){
console.log("[MSkillComp]: show_info",this.skill)
// console.log("[MSkillComp]: show_info",this.skill)
}

View File

@@ -51,7 +51,7 @@ export class MissionComp extends CCComp {
// 奖励发放
}
do_drop(drop_item:any[],game_data:any={exp:0,gold:0,diamond:0}){
console.log("[MissionComp] do_drop",drop_item,game_data)
// console.log("[MissionComp] do_drop",drop_item,game_data)
this.game_data["exp"]+=game_data.exp
this.game_data["gold"]+=game_data.gold
this.game_data["diamond"]+=game_data.diamond
@@ -83,7 +83,7 @@ export class MissionComp extends CCComp {
}
}
if(drop_item.length>0){
console.log("[MissionComp] do_drop 剩余物品",drop_item)
// console.log("[MissionComp] do_drop 剩余物品",drop_item)
for(let i=0;i<drop_item.length;i++){
let d_item=drop_item[i]
let path="game/gui/item"
@@ -99,7 +99,7 @@ export class MissionComp extends CCComp {
}
}
do_mon_dead(event:any,data:any){
console.log("[MissionComp] do_mon_dead",event,data)
// console.log("[MissionComp] do_mon_dead",event,data)
smc.vmdata.mission_data.mon_num--
if(data.drops){
if(data.drops.length>0){
@@ -119,7 +119,7 @@ export class MissionComp extends CCComp {
}
do_hero_dead(event:any,data:any){
console.log("[MissionComp] do_hero_dead",event,data)
// console.log("[MissionComp] do_hero_dead",event,data)
smc.vmdata.mission_data.hero_num--
if(smc.vmdata.mission_data.hero_num<=0) {
oops.message.dispatchEvent(GameEvent.FightEnd,{victory:false})
@@ -143,7 +143,7 @@ export class MissionComp extends CCComp {
async mission_start(){
console.log("[MissionComp] ** 1 ** mission_start")
// console.log("[MissionComp] ** 1 ** mission_start")
this.node.getChildByName("ending").getComponent(Animation).play("startFight")
oops.message.dispatchEvent(GameEvent.FightReady)
this.node.active=true
@@ -172,7 +172,7 @@ export class MissionComp extends CCComp {
fight_end(){
console.log("任务结束")
// console.log("任务结束")
// 延迟0.5秒后执行任务结束逻辑
this.scheduleOnce(() => {
smc.mission.play=false
@@ -182,7 +182,7 @@ export class MissionComp extends CCComp {
}
mission_end(){
console.log("[MissionComp] mission_end")
// console.log("[MissionComp] mission_end")
this.node.getChildByName("ending").active=false
this.node.active=false
}
@@ -195,7 +195,7 @@ export class MissionComp extends CCComp {
smc.vmdata.mission_data.level=0
this.rewards=[] // 改为数组,用于存储掉落物品列表
this.node.getChildByName("reward").getChildByName("items").removeAllChildren()
console.log("[MissionComp]局内数据初始化",smc.vmdata.mission_data)
// console.log("[MissionComp]局内数据初始化",smc.vmdata.mission_data)
}
private cleanComponents() {

View File

@@ -32,7 +32,7 @@ export class MissionHeroCompComp extends CCComp {
// this.test_call()
}
clear_heros(){
console.log("[MissionHeroComp]: FightEnd clear heros")
// console.log("[MissionHeroComp]: FightEnd clear heros")
}
fight_ready(){
@@ -47,11 +47,11 @@ export class MissionHeroCompComp extends CCComp {
// this.current_hero_num=-1
// this.current_hero_uuid=0
smc.vmdata.mission_data.hero_num=0
console.log("[MissionHeroComp]:fight_ready",smc.fight_heros,Object.keys(smc.fight_heros).length)
// console.log("[MissionHeroComp]:fight_ready",smc.fight_heros,Object.keys(smc.fight_heros).length)
let heros:any = smc.fight_heros
for(let i=0;i<Object.keys(heros).length;i++){
if(heros[i]!=0){
console.log("[MissionHeroComp]:fight_ready",heros[i])
// console.log("[MissionHeroComp]:fight_ready",heros[i])
this.addHero(heros[i],false)
}
}
@@ -65,7 +65,7 @@ export class MissionHeroCompComp extends CCComp {
private zhao_huan(event: string, args: any){
console.log("[MissionHeroComp]:zhaohuan",args)
// console.log("[MissionHeroComp]:zhaohuan",args)
this.addHero(args.uuid,false)
}
@@ -73,7 +73,7 @@ export class MissionHeroCompComp extends CCComp {
call_hero(event: string, args: any){
console.log("[MissionHeroComp]:call_hero",this.heros,this.current_hero_num,args)
// console.log("[MissionHeroComp]:call_hero",this.heros,this.current_hero_num,args)
// 尝试升级现有英雄
if (this.tryUpgradeExistingHero(args.uuid)) {
@@ -92,7 +92,7 @@ export class MissionHeroCompComp extends CCComp {
*/
private tryUpgradeExistingHero(uuid: number): boolean {
for (let i = 0; i < this.heros.length; i++) {
console.log("[MissionHeroComp]:tryUpgradeExistingHero",this.heros,i,uuid)
// console.log("[MissionHeroComp]:tryUpgradeExistingHero",this.heros,i,uuid)
if (this.heros[i].uuid === uuid) {
this.heros[i].count++
smc.vmdata[`hero${i+1}`].count=this.heros[i].count
@@ -119,7 +119,7 @@ export class MissionHeroCompComp extends CCComp {
/** 添加英雄 */
private addHero(uuid:number=1001,is_zhaohuan:boolean=false) {
console.log("[MissionHeroComp]:addHero",uuid,is_zhaohuan)
// console.log("[MissionHeroComp]:addHero",uuid,is_zhaohuan)
let hero_pos=0
let hero = ecs.getEntity<Hero>(Hero);
let scale = 1

View File

@@ -106,7 +106,7 @@ export class MissionMonCompComp extends CCComp { // 添加刷怪队列 - 使
let level=smc.vmdata.mission_data.level
const stageType = getStageType(currentStage,level);
const monsterConfigs = getStageMonsterConfigs(currentStage,level);
console.log(`[MissionMonComp]:第${currentStage}关 - ${stageType}类型,怪物数量: ${monsterConfigs.length}`);
// console.log(`[MissionMonComp]:第${currentStage}关 - ${stageType}类型,怪物数量: ${monsterConfigs.length}`);
this.generateMonstersFromStageConfig(monsterConfigs);
}
@@ -116,7 +116,7 @@ export class MissionMonCompComp extends CCComp { // 添加刷怪队列 - 使
const currentStage = smc.data.mission;
// 设置怪物总数
console.log("[MissionMonComp] generateMonstersFromStageConfig",monsterConfigs)
// console.log("[MissionMonComp] generateMonstersFromStageConfig",monsterConfigs)
if (!monsterConfigs || monsterConfigs.length === 0) {
console.warn(`[MissionMonComp]:关卡${currentStage}配置中没有怪物信息`);
return;
@@ -139,13 +139,13 @@ export class MissionMonCompComp extends CCComp { // 添加刷怪队列 - 使
);
});
console.log(`[MissionMonComp]:关卡${currentStage}将生成 ${monsterConfigs.length} 只怪物`);
// console.log(`[MissionMonComp]:关卡${currentStage}将生成 ${monsterConfigs.length} 只怪物`);
// 输出增强属性信息
monsterConfigs.forEach((monsterConfig: any) => {
if (monsterConfig.enhancement && monsterConfig.enhancement.buffList.length > 0) {
console.log(`[MissionMonComp]:怪物 ${monsterConfig.uuid} (${monsterConfig.type}) 拥有增强属性:`,
monsterConfig.enhancement.buffList.map((buff: any) => `${buff.name}:+${buff.value}`));
// console.log(`[MissionMonComp]:怪物 ${monsterConfig.uuid} (${monsterConfig.type}) 拥有增强属性:`,
// monsterConfig.enhancement.buffList.map((buff: any) => `${buff.name}:+${buff.value}`));
}
});
}
@@ -189,7 +189,7 @@ export class MissionMonCompComp extends CCComp { // 添加刷怪队列 - 使
// 增加召唤计数
this.spawnCount++;
console.log(`[MissionMonComp]: 召唤第${this.spawnCount}${monsterData.type}怪物,剩余队列: ${this.monsterQueue.length}`);
// console.log(`[MissionMonComp]: 召唤第${this.spawnCount}只${monsterData.type}怪物,剩余队列: ${this.monsterQueue.length}`);
}
}
@@ -211,13 +211,13 @@ export class MissionMonCompComp extends CCComp { // 添加刷怪队列 - 使
// 如果有增强属性,记录到控制台
if (enhancement && enhancement.buffList && enhancement.buffList.length > 0) {
console.log(`[MissionMonComp]: 怪物 ${uuid} 获得增强属性:`,
enhancement.buffList.map((buff: any) => `${buff.name}:+${buff.value}`));
// console.log(`[MissionMonComp]: 怪物 ${uuid} 获得增强属性:`,
// enhancement.buffList.map((buff: any) => `${buff.name}:+${buff.value}`));
}
// 如果有关卡倍数,记录到控制台
if (stageMultipliers) {
console.log(`[MissionMonComp]: 怪物 ${uuid} 关卡倍数 - HP: x${stageMultipliers.hp.toFixed(2)}, 攻击: x${stageMultipliers.attack.toFixed(2)}`);
// console.log(`[MissionMonComp]: 怪物 ${uuid} 关卡倍数 - HP: x${stageMultipliers.hp.toFixed(2)}, 攻击: x${stageMultipliers.attack.toFixed(2)}`);
}
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */

View File

@@ -27,7 +27,7 @@ export class VictoryComp extends CCComp {
}
onAdded(args: any) {
console.log("[VictoryComp] onAdded",args,smc.items)
// console.log("[VictoryComp] onAdded",args,smc.items)
if(args.game_data){
this.game_data=args.game_data
}
@@ -90,7 +90,7 @@ export class VictoryComp extends CCComp {
})
this.node.getChildByName("btns").getChildByName("double").active=false
}
console.log("[VictoryComp]double_reward",smc.items,this.rewards)
// console.log("[VictoryComp]double_reward",smc.items,this.rewards)
}
restart(){
this.clear_data()
@@ -99,11 +99,11 @@ export class VictoryComp extends CCComp {
}
item_show(e:any,val:any){
console.log("item_show",val)
// console.log("item_show",val)
}
protected onDestroy(): void {
console.log("释放胜利界面");
// console.log("释放胜利界面");
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {