mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
30 lines
776 B
TypeScript
30 lines
776 B
TypeScript
import { _decorator, Component, Label, Node } from 'cc';
|
|
import { app, JNGLayerBase } from '../../App';
|
|
import { sp } from 'cc';
|
|
import PlayerPetData from '../../data/PlayerPetData';
|
|
import { GUI } from '../UIConfig';
|
|
import { UIPetAnim } from '../../consts/GData';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('MainView')
|
|
export class MainView extends JNGLayerBase {
|
|
|
|
//宠物
|
|
@property(sp.Skeleton)
|
|
spine:sp.Skeleton;
|
|
|
|
onJNLoad(data?: any): void {
|
|
//显示被选择的宠物
|
|
this.spine.skeletonData = app.battleRes.roleSpine[PlayerPetData.getIns().getData()[0].petTbId];
|
|
this.spine.setAnimation(0,UIPetAnim.std,true);
|
|
}
|
|
|
|
//点击回到之前的主页
|
|
onClickHome(){
|
|
app.layer.Open(GUI.Home);
|
|
}
|
|
|
|
}
|
|
|
|
|