This commit is contained in:
PC-20230316NUNE\Administrator
2023-11-28 19:20:11 +08:00
parent 5a9ab02b54
commit 720542eadd
17 changed files with 175 additions and 812 deletions

View File

@@ -9,6 +9,7 @@ import { Vec3 } from 'cc';
import { NodeEventType } from 'cc';
import { EventTouch } from 'cc';
import JNodeDrag from '../../../../../extensions/ngame/assets/ngame/util/components/JNodeDrag';
import { PetIcon } from '../Pet/PetIcon';
const { ccclass, property } = _decorator;
@ccclass('PlayerTacticalItem')
@@ -25,6 +26,10 @@ export class PlayerTacticalItem extends Component {
@property(Node)
havePet:Node;
//宠物节点
@property(PetIcon)
petIcon:PetIcon;
//拖拽
@property(JNodeDrag)
drag:JNodeDrag;
@@ -66,12 +71,10 @@ export class PlayerTacticalItem extends Component {
//更新宠物信息
onUpdatePetView(){
let spine = this.havePet.getComponentInChildren(sp.Skeleton);
//获取宠物信息
let info = PlayerPetData.getIns().petIdQueryPetInfo(this.petId);
spine.skeletonData = app.battleRes.roleSpine[info.petTbId];
spine.setAnimation(0,UIPetAnim.std,true);
this.petIcon.set(info);
}
//打开选择阵法宠物