界面调整 去掉技能大页面

This commit is contained in:
2024-12-18 15:58:44 +08:00
parent e7f5b44b1e
commit 25b8e384e7
16 changed files with 11112 additions and 7725 deletions

View File

@@ -1,5 +1,8 @@
import { _decorator, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
import { HeroInfo } from '../common/config/heroSet';
import { oops } from '../../../../extensions/oops-plugin-framework/assets/core/Oops';
import { UIID } from '../common/config/GameUIConfig';
import { Items } from '../common/config/Items';
const { ccclass, property } = _decorator;
@ccclass('HChipComp')
@@ -14,12 +17,17 @@ export class HChipComp extends Component {
update(deltaTime: number) {
}
show_info(){
if(this.node.parent.name=="reward") return
oops.gui.open(UIID.ItemInfo, {uuid:this.h_uuid,type:2});
}
update_data(h_uuid:number,num:number=0){
update_data(uuid:number,num:number=0){
this.h_uuid = uuid;
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[h_uuid].path);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
});
if(num > 0){
this.node.getChildByName("num").getComponent(Label).string = num.toString();

View File

@@ -1,6 +1,9 @@
import { _decorator, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
import { HeroInfo } from '../common/config/heroSet';
import { SkillSet } from '../common/config/SkillSet';
import { oops } from '../../../../extensions/oops-plugin-framework/assets/core/Oops';
import { UIID } from '../common/config/GameUIConfig';
import { Items } from '../common/config/Items';
const { ccclass, property } = _decorator;
@ccclass('SChipComp')
@@ -15,9 +18,13 @@ export class SChipComp extends Component {
update(deltaTime: number) {
}
show_info(){
if(this.node.parent.name=="reward") return
oops.gui.open(UIID.ItemInfo, {uuid:this.h_uuid,type:1});
}
update_data(uuid:number,num:number=0){
this.h_uuid = uuid;
if(num > 0){
this.node.getChildByName("num").getComponent(Label).string = num.toString();
}else{
@@ -32,7 +39,7 @@ export class SChipComp extends Component {
// console.log("update_data",atlas,sprite)
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[uuid].path);
});
}
}