修改完成,todo 关卡设计

This commit is contained in:
2024-12-24 23:43:23 +08:00
parent 38d4858dae
commit 31302ee410
9 changed files with 13107 additions and 12942 deletions

View File

@@ -25,6 +25,6 @@ export const Items={
1016:{uuid: 1016,path: "1016",type:1,lv:4,name: "传说生命石",info:"增加装备生命值50,成功几率50%", },
9001:{uuid: 9001,path: "9001",type:1,lv:0,name: "金币",info:"金币不是万能的,但是没有金币是万万不能的", },
9002:{uuid: 9002,path: "9002",type:1,lv:1,name: "叶子",info:"提升英雄等级的神奇叶子", },
9003:{uuid: 9003,path: "9003",type:1,lv:1,name: "经验",info:"提升英雄等级的神秘石头", },
9003:{uuid: 9003,path: "9003",type:1,lv:1,name: "经验",info:"提升英雄等级", },
}

View File

@@ -5,14 +5,14 @@ export const BoxDrop={
{uuid: 9003,dropRate: 10,num_max: 500,type:0},
],
2:[
{uuid: 9001,dropRate: 10,num_max: 10,type:0},
{uuid: 9002,dropRate: 10,num_max: 10,type:0},
{uuid: 9003,dropRate: 50,num_max: 10,type:0},
{uuid: 5001,dropRate: 10,num_max: 10,type:0},
{uuid: 5002,dropRate: 10,num_max: 10,type:0},
{uuid: 5003,dropRate: 50,num_max: 10,type:0},
],
3:[
{uuid: 9001,dropRate: 20,num_max: 10,type:0},
{uuid: 9002,dropRate: 20,num_max: 10,type:0},
{uuid: 9003,dropRate: 50,num_max: 10,type:0},
{uuid: 5001,dropRate: 20,num_max: 10,type:0},
{uuid: 5002,dropRate: 20,num_max: 10,type:0},
{uuid: 5003,dropRate: 50,num_max: 10,type:0},
],
}
export const BoxDropCount={

View File

@@ -45,8 +45,6 @@ export class HeroHomeComp extends CCComp {
this.role=smc.heros[uuid]
this.hero=HeroInfo[uuid]
console.log("hero_show",uuid)
let tal=this.node.getChildByName("sk").getChildByName("tal");
let sk_node= this.node.getChildByName("sk");
let skill1 = SkillSet[this.hero.sk1[0]]
let skill2 = SkillSet[this.hero.sk2[0]]
var sk_path = "game/skills/skill_icon"
@@ -59,17 +57,17 @@ export class HeroHomeComp extends CCComp {
sprite.spriteFrame = atlas.getSpriteFrame(this.hero.path);
});
resources.load(sk_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("sk").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
const sprite = this.node.getChildByName("bottom").getChildByName("sk").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(skill1.path);
});
this.node.getChildByName("sk").getChildByName("name").getComponent(Label).string = skill1.name;
this.node.getChildByName("sk").getChildByName("info").getComponent(Label).string = skill1.info;
this.node.getChildByName("bottom").getChildByName("sk").getChildByName("name").getComponent(Label).string = skill1.name;
this.node.getChildByName("bottom").getChildByName("sk").getChildByName("info").getComponent(Label).string = skill1.info;
resources.load(sk_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("sk2").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
const sprite = this.node.getChildByName("bottom").getChildByName("sk2").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(skill2.path);
});
this.node.getChildByName("sk2").getChildByName("name").getComponent(Label).string = skill2.name;
this.node.getChildByName("sk2").getChildByName("info").getComponent(Label).string = skill2.info;
this.node.getChildByName("bottom").getChildByName("sk2").getChildByName("name").getComponent(Label).string = skill2.name;
this.node.getChildByName("bottom").getChildByName("sk2").getChildByName("info").getComponent(Label).string = skill2.info;
// tal.getChildByName("slv1").getChildByName("val").getComponent(Label).string = this.hero.tals[0]
// tal.getChildByName("slv2").getChildByName("val").getComponent(Label).string = this.hero.tals[1]
@@ -116,10 +114,10 @@ export class HeroHomeComp extends CCComp {
slvup.getChildByName("btned").active=false
};
if( this.role.slv==0) {
this.node.getChildByName("call").getChildByName("cost").getChildByName("need").getComponent(Label).string = ((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv)).toString()
this.node.getChildByName("call").getChildByName("cost").getChildByName("num").getComponent(Label).string = smc.heros[this.h_uuid].num.toString()
this.node.getChildByName("call").getChildByName("cost").getChildByName("bar").getComponent(ProgressBar).progress = smc.heros[this.h_uuid].num/((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv))
let hchipcomp= this.node.getChildByName("call").getChildByName("cost").getChildByName("hchip").getComponent(HChipComp)
this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("need").getComponent(Label).string = ((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv)).toString()
this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("num").getComponent(Label).string = smc.heros[this.h_uuid].num.toString()
this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("bar").getComponent(ProgressBar).progress = smc.heros[this.h_uuid].num/((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv))
let hchipcomp= this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("hchip").getComponent(HChipComp)
hchipcomp.update_data(this.h_uuid,0)
this.node.getChildByName("call").active=true
}else{
@@ -153,7 +151,7 @@ export class HeroHomeComp extends CCComp {
let attr2 = this.node.getChildByName("attr2")
let info = this.node.getChildByName("info")
let lvup = this.node.getChildByName("lvup")
let sk = this.node.getChildByName("sk")
let sk = this.node.getChildByName("bottom").getChildByName("sk")
let slvup = this.node.getChildByName("slvup")
if(val < 0){
tween(hero).to(0.2,{position:v3(0,hero.position.y)}).start()

View File

@@ -28,10 +28,9 @@ export class VictoryComp extends CCComp {
}
onAdded(args: any) {
}
open(){
console.log("Victory open",smc.items,smc.heros)
var parent = this.node.getChildByName("items")
for (let i in smc.items) {
if(smc.items[i].x1 > 0){
@@ -97,13 +96,12 @@ export class VictoryComp extends CCComp {
// }
for (let i in smc.heros) {
smc.heros[i].x1=0
console.log("clear_x1",smc.heros[i].num)
}
let children = this.node.getChildByName("items").children
console.log("children",children)
for (let i in children) {
children[i].destroy()
}
console.log("clear_x1",smc.items,smc.heros)
this.node.parent.getComponent(MissionComp).to_mission_home()
}