mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
更新升级请求 摸鱼的一天~~~
This commit is contained in:
@@ -2,6 +2,7 @@ import SystemBase from "../../extensions/ngame/assets/ngame/system/SystemBase";
|
||||
import { app } from "./App";
|
||||
import BaseData from "./data/BaseData";
|
||||
import ChatData from "./data/ChatData";
|
||||
import GOnHookData from "./data/GOnHookData";
|
||||
import PlayerData from "./data/PlayerData";
|
||||
import PlayerPetData from "./data/PlayerPetData";
|
||||
import PlayerTacticalData from "./data/PlayerTacticalData";
|
||||
@@ -18,6 +19,7 @@ export class AppData extends SystemBase{
|
||||
ChatData.getIns(), //聊天
|
||||
PlayerTacticalData.getIns(), //阵法
|
||||
ResourceData.getIns(), //玩家资源
|
||||
GOnHookData.getIns(), //无限模式信息类 (无限模式是游戏基础模式玩法 需要默认信息)
|
||||
];
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
|
@@ -3,9 +3,18 @@ import { app } from "../App";
|
||||
import { PlayerPetOV, RData, RProto } from "./API";
|
||||
import { GActionType } from "./GActionType";
|
||||
|
||||
export interface ModeOnHookOV{
|
||||
|
||||
playerId:number; //玩家Id
|
||||
onHookMap:number; //当前玩家所在的地图(配置表Id)
|
||||
|
||||
}
|
||||
|
||||
export const GAPI = {
|
||||
|
||||
/************** 无限模式接口 ********************/
|
||||
//获取模式信息
|
||||
GOnHookInfo : async () => RData(await app.api.get(`/game/mode/onHook/info`)) as ModeOnHookOV,
|
||||
//生成野怪
|
||||
GOnHookSpawnCreeps : async () => RProto(await app.api.get(`/game/mode/onHook/onSpawnCreeps`,{responseType:'arraybuffer'}),GActionType.GOnHookPets) as GOnHookPets,
|
||||
//捕捉野怪
|
||||
|
15
JisolGameCocos/assets/script/data/GOnHookData.ts
Normal file
15
JisolGameCocos/assets/script/data/GOnHookData.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { GAPI, ModeOnHookOV } from "../consts/GAPI";
|
||||
import BaseData from "./BaseData";
|
||||
|
||||
//无限模式数据类
|
||||
export default class GOnHookData extends BaseData{
|
||||
|
||||
info:ModeOnHookOV;
|
||||
|
||||
async onInit() {
|
||||
this.info = await GAPI.GOnHookInfo();
|
||||
console.log("GOnHookData Info",this.info);
|
||||
}
|
||||
|
||||
}
|
||||
|
9
JisolGameCocos/assets/script/data/GOnHookData.ts.meta
Normal file
9
JisolGameCocos/assets/script/data/GOnHookData.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "f5a8c28b-dae6-4393-b922-3fbc5097400d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user