mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { PetIcon } from './PetIcon';
|
||||
import { PlayerPetOV } from '../../../consts/API';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PetIconSelectShow')
|
||||
export class PetIconSelectShow extends Component {
|
||||
|
||||
//没有宠物的节点
|
||||
@property(Node)
|
||||
noPet:Node;
|
||||
|
||||
//有宠物的节点
|
||||
@property(Node)
|
||||
havePet:Node;
|
||||
|
||||
//宠物节点
|
||||
@property(PetIcon)
|
||||
petIcon:PetIcon;
|
||||
|
||||
set(info:PlayerPetOV){
|
||||
if(info){
|
||||
this.noPet.active = false;
|
||||
this.havePet.active = true;
|
||||
this.petIcon.set(info);
|
||||
}else{
|
||||
this.noPet.active = true;
|
||||
this.havePet.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ad2c1e10-e6e6-43a0-9953-82caa7a764f2",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user