提交新手引导

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-13 02:37:29 +08:00
parent ada44b2fd1
commit c519fae9a4
71 changed files with 4009 additions and 375 deletions

View File

@@ -0,0 +1,39 @@
import { API, PlayerInfoOV, PlayerPetOV } from "../consts/API";
import BaseData from "./BaseData";
//玩家宠物数据
export default class PlayerPetData extends BaseData{
//玩家宠物列表
datas:PlayerPetOV[] = [];
async onInit() {
//更新玩家宠物
await this.UpdatePlayerPet();
}
//获取全部宠物
getData(){
return this.datas;
}
//更新玩家宠物
async UpdatePlayerPet(){
//获取全部宠物
this.datas = await API.GetPlayerPets();
}
//选择宠物
async SelectNovicePet(petId:number){
await API.SelectNovicePet(petId);
//更新玩家宠物列表
await this.UpdatePlayerPet();
}
}