fix(game): 调整怪物生成逻辑和UI尺寸,优化资源图集

- 修复怪物生成时近战/远程类型与槽位不匹配的问题,增加槽位类型限制
- 调整加载界面进度条尺寸和颜色,优化视觉表现
- 修改任务主页组件,注释掉未使用的标签切换功能
- 更新资源图集布局,修正精灵帧坐标和旋转状态
- 调整英雄界面预制件的部分UI元素尺寸
This commit is contained in:
walkpan
2026-04-01 22:25:07 +08:00
parent a645e65b09
commit c7cb8b3e1e
14 changed files with 2910 additions and 7818 deletions

View File

@@ -55,7 +55,7 @@ export class MissionHomeComp extends CCComp {
home_active(){
this.uodate_data()
this.node.active=true
this.switch_tab('home')
// this.switch_tab('home')
}
uodate_data(){
@@ -63,25 +63,25 @@ export class MissionHomeComp extends CCComp {
isWxClient(){
return typeof wx !== 'undefined' && typeof (wx as any).getSystemInfoSync === 'function';
}
btn_func(e: any, data: string){
if (['home', 'hero', 'rank'].includes(data)) {
this.switch_tab(data);
}
}
// btn_func(e: any, data: string){
// if (['home', 'hero', 'rank'].includes(data)) {
// this.switch_tab(data);
// }
// }
switch_tab(tab: string) {
if (this.heros_page) this.heros_page.active = tab === 'hero';
if (this.rank_page) this.rank_page.active = tab === 'rank';
// switch_tab(tab: string) {
// if (this.heros_page) this.heros_page.active = tab === 'hero';
// if (this.rank_page) this.rank_page.active = tab === 'rank';
const setBtnActive = (btn: Node, isActive: boolean) => {
const activeNode = btn?.getChildByName('active');
if (activeNode) activeNode.active = isActive;
}
// const setBtnActive = (btn: Node, isActive: boolean) => {
// const activeNode = btn?.getChildByName('active');
// if (activeNode) activeNode.active = isActive;
// }
setBtnActive(this.home_btn, tab === 'home');
setBtnActive(this.hero_btn, tab === 'hero');
setBtnActive(this.rank_btn, tab === 'rank');
}
// setBtnActive(this.home_btn, tab === 'home');
// setBtnActive(this.hero_btn, tab === 'hero');
// setBtnActive(this.rank_btn, tab === 'rank');
// }
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */