修补小错误

This commit is contained in:
2024-11-28 10:47:45 +08:00
parent f32a7e5c47
commit a0cc46e0b2
3 changed files with 4 additions and 4 deletions

View File

@@ -21,5 +21,6 @@ export const Items={
1026:{uuid: 1026,path: "2307",type: 1,r_num:1,name: "高级生命石",info:"增加装备生命值", }, 1026:{uuid: 1026,path: "2307",type: 1,r_num:1,name: "高级生命石",info:"增加装备生命值", },
1027:{uuid: 1027,path: "2308",type: 1,r_num:1,name: "稀有生命石",info:"增加装备生命值", }, 1027:{uuid: 1027,path: "2308",type: 1,r_num:1,name: "稀有生命石",info:"增加装备生命值", },
1028:{uuid: 1028,path: "2309",type: 1,r_num:1,name: "传说生命石",info:"增加装备生命值", }, 1028:{uuid: 1028,path: "2309",type: 1,r_num:1,name: "传说生命石",info:"增加装备生命值", },
9001:{uuid: 1028,path: "2309",type: 1,r_num:1,name: "金币",info:"金币不是万能的,但是没有金币是万万不能的", },
} }

View File

@@ -10,7 +10,6 @@ const { ccclass, property } = _decorator;
@ecs.register('ItemInfo', false) @ecs.register('ItemInfo', false)
export class ItemInfoComp extends CCComp { export class ItemInfoComp extends CCComp {
onAdded(args: any) { onAdded(args: any) {
console.log("args",args);
this.node.getChildByName("name").getComponent(Label).string=args.name this.node.getChildByName("name").getComponent(Label).string=args.name
this.node.getChildByName("info").getComponent(Label).string=args.info this.node.getChildByName("info").getComponent(Label).string=args.info
} }

View File

@@ -46,11 +46,11 @@ export class VictoryComp extends CCComp {
let item1=ecs.getEntity<Item>(Item) let item1=ecs.getEntity<Item>(Item)
let gold: number = Math.floor(RandomManager.instance.getRandomInt((3000 + smc.vmdata.mission.lv * 100) / 3 * 2, 3000 + smc.vmdata.mission.lv * 100)); let gold: number = Math.floor(RandomManager.instance.getRandomInt((3000 + smc.vmdata.mission.lv * 100) / 3 * 2, 3000 + smc.vmdata.mission.lv * 100));
let parent = this.node.getChildByName("Node").getChildByName("items") let parent = this.node.getChildByName("Node").getChildByName("items")
item1.load(1001,gold,parent) let reward:any = RandomManager.instance.getRandomByObjectList(MissionReward[this.reward_lv], conut);
item1.load(9001,gold,parent)
for (let i = 0; i < conut; i++) { for (let i = 0; i < conut; i++) {
let item=ecs.getEntity<Item>(Item) let item=ecs.getEntity<Item>(Item)
let reward:any = RandomManager.instance.getRandomByObjectList(MissionReward[this.reward_lv], 1); let im =Items[reward[i]]
let im =Items[reward[0]]
item.load(im.uuid,im.r_num,parent) item.load(im.uuid,im.r_num,parent)
} }
this.if_show=true this.if_show=true