This commit is contained in:
PC-20230316NUNE\Administrator
2024-01-10 19:09:14 +08:00
parent 0d745b9715
commit d0d80bb9ad
34 changed files with 764 additions and 146 deletions

View File

@@ -6,6 +6,7 @@ import { v3 } from 'cc';
import { PlayerPetOV } from '../../../consts/API';
import { Label } from 'cc';
import { PlayerPetEvent } from '../../../data/PlayerPetData';
import PetEquipData from '../../../data/PetEquipData';
const { ccclass, property } = _decorator;
@ccclass('PetIcon')
@@ -17,6 +18,10 @@ export class PetIcon extends Component {
@property(Node)
starNode:Node; //星星
@property(Label)
levelLabel:Label; //等级
info:PlayerPetOV;
onLoad(){
@@ -53,6 +58,9 @@ export class PetIcon extends Component {
this.starNode.active = true;
this.starNode.getComponentInChildren(Label).string = `${this.info.petStar}`;
}
//设置宠物等级
this.levelLabel.string = `Lv ${PetEquipData.getIns().getForgingBenchPetLevel(this.info.petId)}`
}