ui调整 去掉一些不要的

This commit is contained in:
2025-08-03 16:25:51 +08:00
parent eff5f21d04
commit 5c8a15262e
27 changed files with 33862 additions and 42086 deletions

View File

@@ -35,7 +35,6 @@ export class BarCompComp extends CCComp {
}
private readay(){
this.node.getChildByName("bar").active = true
this.node.getChildByName("bar").getChildByName("more").active=false
}
private master_called(e:any,data:any){
this.node.getChildByName("bar").active = true
@@ -61,22 +60,11 @@ export class BarCompComp extends CCComp {
}
show_master_more(){
let barNode = this.node.getChildByName("bar");
let node = barNode.getChildByName("more");
node.active = true;
node.setScale(v3(1, 0, 1));
console.log("[barcomp]:show_master_more",node)
// 使用缓动动画放大和移动
tween(node).to(0.2, {scale:v3(1,1,1)}).start()
}
hide_master_more(){
let barNode = this.node.getChildByName("bar");
let node = barNode.getChildByName("more");
console.log("[barcomp]:hide_master_more",node)
// 使用缓动动画放大和移动
tween(node).to(0.2, {scale:v3(1,0,1)}).start()
node.active = false;
}
update_bar(){

View File

@@ -162,9 +162,6 @@ export class CardComp extends CCComp {
// show.getChildByName("hp").active=true
// show.getChildByName("ap").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].ap.toString()
// show.getChildByName("hp").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].hp.toString()
// show.getChildByName("type").getChildByName("war").active=HeroInfo[uuid].type==0
// show.getChildByName("type").getChildByName("bow").active=HeroInfo[uuid].type==1
// show.getChildByName("type").getChildByName("mag").active=HeroInfo[uuid].type==2
// show.getChildByName("lv").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].lv.toString()
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
@@ -232,15 +229,12 @@ export class CardComp extends CCComp {
switch(this.c_type){
case cardType.HERO:
show.getChildByName("mask").getChildByName("hero").active=true
show.getChildByName("type").getChildByName("name").getComponent(Label).string="英雄"
break
case cardType.SKILL:
show.getChildByName("mask").getChildByName("skill").active=true
show.getChildByName("type").getChildByName("name").getComponent(Label).string="技能"
break
case cardType.TALENT:
show.getChildByName("mask").getChildByName("tal").active=true
show.getChildByName("type").getChildByName("name").getComponent(Label).string="天赋"
break
case cardType.EQUIP:
show.getChildByName("mask").getChildByName("equip").active=true
@@ -256,11 +250,9 @@ export class CardComp extends CCComp {
break
}
show.getChildByName("type").getChildByName("name").getComponent(Label).string="装备"
break
case cardType.SPECIAL:
show.getChildByName("mask").getChildByName("func").active=true
show.getChildByName("type").getChildByName("name").getComponent(Label).string="特效"
break
}
show.getChildByName("q1").active=q==Quality.WHITE
@@ -268,11 +260,11 @@ export class CardComp extends CCComp {
show.getChildByName("q3").active=q==Quality.BLUE
show.getChildByName("q4").active=q==Quality.PURPLE
show.getChildByName("q5").active=q==Quality.ORANGE
show.getChildByName("mask").getChildByName("q1").active=q==Quality.WHITE
show.getChildByName("mask").getChildByName("q2").active=q==Quality.GREEN
show.getChildByName("mask").getChildByName("q3").active=q==Quality.BLUE
show.getChildByName("mask").getChildByName("q4").active=q==Quality.PURPLE
show.getChildByName("mask").getChildByName("q5").active=q==Quality.ORANGE
show.getChildByName("fq1").active=q==Quality.WHITE
show.getChildByName("fq2").active=q==Quality.GREEN
show.getChildByName("fq3").active=q==Quality.BLUE
show.getChildByName("fq4").active=q==Quality.PURPLE
show.getChildByName("fq5").active=q==Quality.ORANGE
// this.node.getChildByName("show").getChildByName("coins").active=false
// this.node.getChildByName("show").getChildByName("coins").getChildByName("num").getComponent(Label).string=this.get_cost_gold(q).toString()
}

View File

@@ -95,7 +95,7 @@ export class MissionComp extends CCComp {
count_tal(){
let count=0
for(let i=0;i<5;i++){
for(let i=0;i<FightSet.TAL_NUM;i++){
if(this.tals[i]){
count++
}
@@ -106,7 +106,7 @@ export class MissionComp extends CCComp {
do_mon_dead(){
this.do_mon_dead_thing()
smc.vmdata.mission_data.mon_num--
if(smc.vmdata.mission_data.mon_num<=0 && this.count_tal() < 6) {
if(smc.vmdata.mission_data.mon_num<=0 && this.count_tal() < FightSet.TAL_NUM) {
if(smc.vmdata.mission_data.current_wave == RogueTalWave[this.count_tal()].wave){
console.log("[MissionComp] current_wave:"+smc.vmdata.mission_data.current_wave+" tal wave:"+RogueTalWave[this.count_tal()].wave)
oops.message.dispatchEvent(GameEvent.TalentSelect,{slot:TalentSlot[this.count_tal()]})
@@ -311,7 +311,7 @@ export class MissionComp extends CCComp {
oops.message.dispatchEvent(GameEvent.LuckCardUsed,card)
}
show_lucky_gold(card:any){
this.node.getChildByName("luckybox").getComponent(Animation).play("luckyopen")
// this.node.getChildByName("luckybox").getComponent(Animation).play("luckyopen")
var path = "game/gui/lcard";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
@@ -325,9 +325,7 @@ export class MissionComp extends CCComp {
position: v3(0, height-300),
}, {easing:"backOut"})
.start();
this.scheduleOnce(()=>{
this.node.getChildByName("luckybox").getComponent(Animation).play("lucky")
},1)
}
private cleanComponents() {
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});

View File

@@ -39,14 +39,14 @@ export class TalsComp extends Component {
this.boxs.getChildByName("tal2").getChildByName("icon").active=false
this.boxs.getChildByName("tal3").getChildByName("icon").active=false
this.boxs.getChildByName("tal4").getChildByName("icon").active=false
this.boxs.getChildByName("tal5").getChildByName("icon").active=false
this.boxs.getChildByName("tal6").getChildByName("icon").active=false
// this.boxs.getChildByName("tal5").getChildByName("icon").active=false
// this.boxs.getChildByName("tal6").getChildByName("icon").active=false
this.boxs.getChildByName("tal1").getChildByName("light").active=false
this.boxs.getChildByName("tal2").getChildByName("light").active=false
this.boxs.getChildByName("tal3").getChildByName("light").active=false
this.boxs.getChildByName("tal4").getChildByName("light").active=false
this.boxs.getChildByName("tal5").getChildByName("light").active=false
this.boxs.getChildByName("tal6").getChildByName("light").active=false
// this.boxs.getChildByName("tal5").getChildByName("light").active=false
// this.boxs.getChildByName("tal6").getChildByName("light").active=false
this.reset_attrs()
}
tal_add(e:GameEvent,data:any){