技能碎片完成

This commit is contained in:
2024-12-17 16:55:50 +08:00
parent 3aca9948f2
commit a05d7a4507
8 changed files with 956 additions and 24 deletions

View File

@@ -4,6 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { Items } from "../common/config/Items";
import { HChipComp } from "../hero/HChipComp";
import { SChipComp } from "../hero/SChipComp";
const { ccclass, property } = _decorator;
@@ -33,11 +34,17 @@ export class RewardComp extends CCComp {
if(type==1){
this.node.getChildByName("icon").active=false
this.node.getChildByName("hchip").active=true
let hchipcomp= this.node.getChildByName("hchip").getComponent(HChipComp)
hchipcomp.update_data(uuid,0)
let hc= this.node.getChildByName("hchip").getComponent(HChipComp)
hc.update_data(uuid,0)
}
if(type==2){
this.node.getChildByName("icon").active=false
this.node.getChildByName("schip").active=true
let sc= this.node.getChildByName("schip").getComponent(SChipComp)
sc.update_data(uuid,0)
}
this.node.getChildByName("x1").getComponent(Label).string = x1.toString()
this.node.getChildByName("x10").getComponent(Label).string = x10.toString()
this.node.parent = parent