去掉大部分 调试信息

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

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){