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