mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-12-08 14:00:02 +00:00
提交新手引导
This commit is contained in:
21
JisolGameCocos/assets/script/data/PlayerData.ts
Normal file
21
JisolGameCocos/assets/script/data/PlayerData.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { API, PlayerInfoOV } from "../consts/API";
|
||||
import BaseData from "./BaseData";
|
||||
|
||||
|
||||
//玩家数据
|
||||
export default class PlayerData extends BaseData{
|
||||
|
||||
data:PlayerInfoOV;
|
||||
|
||||
async onInit() {
|
||||
console.log("PlayerData",await API.GetPlayerInfo())
|
||||
this.data = (await API.GetPlayerInfo());
|
||||
}
|
||||
|
||||
//获取玩家信息
|
||||
getInfo():PlayerInfoOV{
|
||||
return this.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user