This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-01-09 04:33:21 +08:00
parent e8a1cb9362
commit a153d98cf1
29 changed files with 1337 additions and 2726 deletions

View File

@@ -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;
}
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "ad2c1e10-e6e6-43a0-9953-82caa7a764f2",
"files": [],
"subMetas": {},
"userData": {}
}