mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -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)}`
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user