mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
25 lines
537 B
TypeScript
25 lines
537 B
TypeScript
import { sp } from 'cc';
|
|
import { _decorator, Component, Node } from 'cc';
|
|
import { app } from '../../../App';
|
|
import { UIPetAnim } from '../../../consts/GData';
|
|
import { v3 } from 'cc';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('PetIcon')
|
|
export class PetIcon extends Component {
|
|
|
|
@property(sp.Skeleton)
|
|
spine:sp.Skeleton;
|
|
|
|
//设置icon
|
|
setIcon(petTbId:number){
|
|
|
|
this.spine.skeletonData = app.battleRes.roleSpine[petTbId];
|
|
this.spine.setAnimation(0,UIPetAnim.std,true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|