提交新手引导

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

Binary file not shown.

View File

@ -0,0 +1,186 @@
const path = require("path");
const child_process = require("child_process");
const fs = require("fs");
/**
* @typedef {Object} proto_list
* @property {string | undefined} namespace_s 命名空间
* @property {string[]} proto_ss 协议文件(生成为脚本的协议文件)
* @property {string} ts_output_path_s ts 输出路径(带脚本名)
* @property {string} dts_output_path_s d.ts 输出路径(带脚本名)
* @property {string[] | undefined} pbjs_parameters_ss pbjs 生成时参数(可用于裁剪代码, 命令行`npx pbjs`查看具体参数)
*/
module.exports = {
/**
* 协议列表
* @type {proto_list[]}
*/
proto_list: [],
/**
自动构建开关
- true: 递归监听 dir_path_ss 内的文件添加/删除/修改并触发构建指令
- false需要手动点击 `protobuf/构建` 才会触发构建菜单
*/
automatic_build_b: false,
/** 自动构建延迟(秒),防止短时间内频繁触发构建 */
automatic_build_delay_s_n: 2,
/**
* 构建函数
* @param {proto_list} config_ proto 配置
* @returns {boolean} 成功状态
*/
async build_f(config_) {
// 生成消息头
child_process.execSync("npx ts-node ./protobuf/main.ts", {
"cwd": "./tool"
})
/** ts 输出路径 */
let ts_output_path_s = config_.ts_output_path_s[0] !== "." ? config_.ts_output_path_s : path.join(__dirname, config_.ts_output_path_s);
/** js 输出路径 */
let js_output_path_s = path.join(path.dirname(ts_output_path_s), path.basename(ts_output_path_s, path.extname(ts_output_path_s)) + ".js");
/** 声明文件路径 */
let dts_path_s = config_.dts_output_path_s[0] !== "." ? config_.dts_output_path_s : path.join(__dirname, config_.dts_output_path_s);
// 确保文件夹存在
{
if (!fs.existsSync(path.dirname(ts_output_path_s))) {
fs.mkdirSync(path.dirname(ts_output_path_s));
}
if (!fs.existsSync(path.dirname(dts_path_s))) {
fs.mkdirSync(path.dirname(dts_path_s));
}
}
let result = await Promise.resolve()
// 生成 js 文件
.then(() => {
return new Promise((resolve_f, reject_t) => {
// 使用 es6 的生成类型
child_process.exec(
`npx pbjs -t static-module -w es6 -l eslint-disable --es6 --keep-case ${!config_.pbjs_parameters_ss ? "" : config_.pbjs_parameters_ss.join(" ")
} ${!config_.namespace_s ? "" : `--root ${config_.namespace_s}`} -o ${js_output_path_s} ${config_.proto_ss.join(" ")}`,
{
cwd: __dirname,
},
(error, stdout, stderr) => {
if (stderr) {
reject_t(stderr);
return;
}
resolve_f();
}
);
});
})
// 生成 d.ts 文件
.then(() => {
// 生成 d.ts
return new Promise((resolve_f, reject_t) => {
child_process.exec(
`npx pbts -m ${config_.namespace_s ? `--root ${config_.namespace_s}` : ""} -o ${dts_path_s} ${js_output_path_s}`,
{
cwd: __dirname,
},
(error, stdout, stderr) => {
if (stderr) {
reject_t(stderr);
return;
}
resolve_f();
}
);
});
})
// js 后处理
.then(() => {
let file_s = fs.readFileSync(js_output_path_s, "utf-8");
file_s = file_s
// 替换 import
.replace('import * as $protobuf from "protobufjs/minimal";', 'import $protobuf from "protobufjs/minimal.js";')
// 替换 root
.replace(/const \$root = ([^]+?);/, "const $root = {};");
// 存在命名空间
if (config_.namespace_s) {
file_s = file_s.replace(/export const /g, "const ");
}
// 更新协议文件
fs.writeFileSync(js_output_path_s, file_s);
})
// d.ts 文件后处理
.then(() => {
let file_s = fs.readFileSync(dts_path_s, "utf-8");
if (config_.namespace_s) {
file_s = `export namespace ${config_.namespace_s} {\n${file_s}\n}`;
}
// 添加类型声明
file_s = `import type { Long } from "protobufjs";\n` + file_s;
// 后处理
file_s = file_s.replace(/\$protobuf/g, "protobuf");
// 更新协议文件
fs.writeFileSync(dts_path_s, file_s);
})
// 将 js 协议脚本转换为 ts
.then(() => {
let js_file_s = fs.readFileSync(js_output_path_s, "utf-8");
/** ts 文件路径 */
let ts_script_path_s = path.join(
path.dirname(ts_output_path_s),
path.basename(ts_output_path_s, path.extname(ts_output_path_s)) + ".ts"
);
/** d.ts 相对路径 */
let dts_relative_path_s = path.relative(path.dirname(ts_output_path_s), path.dirname(dts_path_s)).replace(/\\/g, "/");
/** d.ts 导入路径 */
let dts_import_path_s = (dts_relative_path_s || "./") + path.basename(dts_path_s, ".ts");
// 后处理
js_file_s = js_file_s
// 对象类型const $root: typeof import("./test.d").pb
.replace(
"const $root = ",
`const $root: typeof import("${dts_import_path_s}")${config_.namespace_s ? `.${config_.namespace_s}` : ""} = `
)
// 修复对象类型错误
.replace(
/export const ([^ ]+?) = ([^ ]+?) =/g,
function (...args_as) {
return `export const ${args_as[1]}: typeof ${args_as[2]} = ${args_as[2]} =`;
}
);
if (config_.namespace_s) {
js_file_s = js_file_s
// module.exports
.replace(
"export { $root as default }",
`export ${config_.namespace_s ? `const ${config_.namespace_s} = ` : ""}{ ...$root }`);
}
fs.writeFileSync(js_output_path_s, "// @ts-nocheck\n" + js_file_s);
fs.renameSync(js_output_path_s, ts_script_path_s);
})
// 捕获错误
.catch((error) => {
console.error("生成错误:", error);
return false;
})
// 任务完成
.then((v) => {
return v ?? true;
});
return result;
},
};

View File

@ -7,10 +7,10 @@
"subMetas": {}, "subMetas": {},
"userData": { "userData": {
"isBundle": true, "isBundle": true,
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt",
"bundleName": "resources", "bundleName": "resources",
"priority": 8, "priority": 8,
"compressionType": {}, "compressionType": {},
"isRemoteBundle": {} "isRemoteBundle": {},
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt"
} }
} }

View File

@ -147,7 +147,7 @@
}, },
"_depth": 1, "_depth": 1,
"_stencil": 0, "_stencil": 0,
"_clearFlags": 7, "_clearFlags": 6,
"_rect": { "_rect": {
"__type__": "cc.Rect", "__type__": "cc.Rect",
"x": 0, "x": 0,

View File

@ -0,0 +1,9 @@
//全局表枚举
export enum TbGGlobalEnum{
SELECT_PET_ID = 70001, //选择宠物配置表Id
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "d9c2c57c-b824-4392-b668-64d669f5d31d",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -12,6 +12,39 @@
export namespace TB {
export class TbGGlobal {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.args === undefined) { throw new Error() }
this.args = _json_.args
if (_json_.tig === undefined) { throw new Error() }
this.tig = _json_.tig
}
/**
* id
*/
readonly id: number
/**
*
*/
readonly args: string
/**
*
*/
readonly tig: string
resolve(tables:Tables)
{
}
}
}
export namespace TB { export namespace TB {
export class TbGRole { export class TbGRole {
@ -57,69 +90,6 @@ export class TbGRole {
} }
export namespace TB {
export class TbGMap {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.mapName === undefined) { throw new Error() }
this.mapName = _json_.mapName
if (_json_.map1 === undefined) { throw new Error() }
this.map1 = _json_.map1
if (_json_.map2 === undefined) { throw new Error() }
this.map2 = _json_.map2
if (_json_.map3 === undefined) { throw new Error() }
this.map3 = _json_.map3
if (_json_.map1OffsetY === undefined) { throw new Error() }
this.map1OffsetY = _json_.map1OffsetY
if (_json_.map2OffsetY === undefined) { throw new Error() }
this.map2OffsetY = _json_.map2OffsetY
if (_json_.map3OffsetY === undefined) { throw new Error() }
this.map3OffsetY = _json_.map3OffsetY
}
/**
* id
*/
readonly id: number
/**
*
*/
readonly mapName: string
/**
* 1()
*/
readonly map1: string
/**
* 2()
*/
readonly map2: string
/**
* 3()
*/
readonly map3: string
/**
* 1() Y
*/
readonly map1OffsetY: number
/**
* 2() Y
*/
readonly map2OffsetY: number
/**
* 2() Y
*/
readonly map3OffsetY: number
resolve(tables:Tables)
{
}
}
}
export namespace TB { export namespace TB {
export class TbGRoleAttack { export class TbGRoleAttack {
@ -237,6 +207,101 @@ export class TbGRoleSkill {
} }
export namespace TB {
export class TbGMap {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.mapName === undefined) { throw new Error() }
this.mapName = _json_.mapName
if (_json_.map1 === undefined) { throw new Error() }
this.map1 = _json_.map1
if (_json_.map2 === undefined) { throw new Error() }
this.map2 = _json_.map2
if (_json_.map3 === undefined) { throw new Error() }
this.map3 = _json_.map3
if (_json_.map1OffsetY === undefined) { throw new Error() }
this.map1OffsetY = _json_.map1OffsetY
if (_json_.map2OffsetY === undefined) { throw new Error() }
this.map2OffsetY = _json_.map2OffsetY
if (_json_.map3OffsetY === undefined) { throw new Error() }
this.map3OffsetY = _json_.map3OffsetY
}
/**
* id
*/
readonly id: number
/**
*
*/
readonly mapName: string
/**
* 1()
*/
readonly map1: string
/**
* 2()
*/
readonly map2: string
/**
* 3()
*/
readonly map3: string
/**
* 1() Y
*/
readonly map1OffsetY: number
/**
* 2() Y
*/
readonly map2OffsetY: number
/**
* 2() Y
*/
readonly map3OffsetY: number
resolve(tables:Tables)
{
}
}
}
export class TbGGlobal{
private _dataMap: Map<number, TB.TbGGlobal>
private _dataList: TB.TbGGlobal[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGGlobal>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGGlobal
_v = new TB.TbGGlobal(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGGlobal> { return this._dataMap; }
getDataList(): TB.TbGGlobal[] { return this._dataList; }
get(key: number): TB.TbGGlobal | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGRole{ export class TbGRole{
@ -271,38 +336,6 @@ export class TbGRole{
export class TbGMap{
private _dataMap: Map<number, TB.TbGMap>
private _dataList: TB.TbGMap[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGMap>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGMap
_v = new TB.TbGMap(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGMap> { return this._dataMap; }
getDataList(): TB.TbGMap[] { return this._dataList; }
get(key: number): TB.TbGMap | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGRoleAttack{ export class TbGRoleAttack{
private _dataMap: Map<number, TB.TbGRoleAttack> private _dataMap: Map<number, TB.TbGRoleAttack>
private _dataList: TB.TbGRoleAttack[] private _dataList: TB.TbGRoleAttack[]
@ -399,31 +432,67 @@ export class TbGRoleSkill{
export class TbGMap{
private _dataMap: Map<number, TB.TbGMap>
private _dataList: TB.TbGMap[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGMap>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGMap
_v = new TB.TbGMap(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGMap> { return this._dataMap; }
getDataList(): TB.TbGMap[] { return this._dataList; }
get(key: number): TB.TbGMap | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
type JsonLoader = (file: string) => any type JsonLoader = (file: string) => any
export class Tables { export class Tables {
private _TbGGlobal: TbGGlobal
get TbGGlobal(): TbGGlobal { return this._TbGGlobal;}
private _TbGRole: TbGRole private _TbGRole: TbGRole
get TbGRole(): TbGRole { return this._TbGRole;} get TbGRole(): TbGRole { return this._TbGRole;}
private _TbGMap: TbGMap
get TbGMap(): TbGMap { return this._TbGMap;}
private _TbGRoleAttack: TbGRoleAttack private _TbGRoleAttack: TbGRoleAttack
get TbGRoleAttack(): TbGRoleAttack { return this._TbGRoleAttack;} get TbGRoleAttack(): TbGRoleAttack { return this._TbGRoleAttack;}
private _TbGRoleBattleRes: TbGRoleBattleRes private _TbGRoleBattleRes: TbGRoleBattleRes
get TbGRoleBattleRes(): TbGRoleBattleRes { return this._TbGRoleBattleRes;} get TbGRoleBattleRes(): TbGRoleBattleRes { return this._TbGRoleBattleRes;}
private _TbGRoleSkill: TbGRoleSkill private _TbGRoleSkill: TbGRoleSkill
get TbGRoleSkill(): TbGRoleSkill { return this._TbGRoleSkill;} get TbGRoleSkill(): TbGRoleSkill { return this._TbGRoleSkill;}
private _TbGMap: TbGMap
get TbGMap(): TbGMap { return this._TbGMap;}
constructor(loader: JsonLoader) { constructor(loader: JsonLoader) {
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
this._TbGRole = new TbGRole(loader('tbgrole')) this._TbGRole = new TbGRole(loader('tbgrole'))
this._TbGMap = new TbGMap(loader('tbgmap'))
this._TbGRoleAttack = new TbGRoleAttack(loader('tbgroleattack')) this._TbGRoleAttack = new TbGRoleAttack(loader('tbgroleattack'))
this._TbGRoleBattleRes = new TbGRoleBattleRes(loader('tbgrolebattleres')) this._TbGRoleBattleRes = new TbGRoleBattleRes(loader('tbgrolebattleres'))
this._TbGRoleSkill = new TbGRoleSkill(loader('tbgroleskill')) this._TbGRoleSkill = new TbGRoleSkill(loader('tbgroleskill'))
this._TbGMap = new TbGMap(loader('tbgmap'))
this._TbGGlobal.resolve(this)
this._TbGRole.resolve(this) this._TbGRole.resolve(this)
this._TbGMap.resolve(this)
this._TbGRoleAttack.resolve(this) this._TbGRoleAttack.resolve(this)
this._TbGRoleBattleRes.resolve(this) this._TbGRoleBattleRes.resolve(this)
this._TbGRoleSkill.resolve(this) this._TbGRoleSkill.resolve(this)
this._TbGMap.resolve(this)
} }
} }

View File

@ -0,0 +1,7 @@
[
{
"id": 70001,
"args": "[10004,10001,10002]",
"tig": "新手引导选择宠物[妙蛙种子,小石头,疯狂石头]"
}
]

View File

@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "1bab3314-296c-4ade-91fa-a20dee0a3243",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "d1b3b996-3e05-4157-a712-8073277b2be8",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -59,22 +59,25 @@
}, },
{ {
"__id__": 161 "__id__": 161
},
{
"__id__": 167
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 167 "__id__": 182
}, },
{ {
"__id__": 169 "__id__": 184
}, },
{ {
"__id__": 171 "__id__": 186
} }
], ],
"_prefab": { "_prefab": {
"__id__": 173 "__id__": 188
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -3979,6 +3982,369 @@
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{
"__type__": "cc.Node",
"_name": "Button-005",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 168
}
],
"_active": true,
"_components": [
{
"__id__": 174
},
{
"__id__": 176
},
{
"__id__": 178
}
],
"_prefab": {
"__id__": 181
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -122.21,
"y": 388.865,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 512,
"__editorExtras__": {},
"_parent": {
"__id__": 167
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 169
},
{
"__id__": 171
}
],
"_prefab": {
"__id__": 173
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 168
},
"_enabled": true,
"__prefab": {
"__id__": 170
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "181opkbsFLlJNymR3M4uvu"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 168
},
"_enabled": true,
"__prefab": {
"__id__": 172
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_string": "关闭页面",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 1,
"_enableWrapText": false,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "81YMncu2NHsagDuwTq7/U6"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "d3Bd/9nkpON4BJ8l9e8YpR",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 167
},
"_enabled": true,
"__prefab": {
"__id__": 175
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f2A4s7sxNJZoPz5Yxd1Kjo"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 167
},
"_enabled": true,
"__prefab": {
"__id__": 177
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d5zsQW2rJHwJgz15jlkPil"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 167
},
"_enabled": true,
"__prefab": {
"__id__": 179
},
"clickEvents": [
{
"__id__": 180
}
],
"_interactable": true,
"_transition": 2,
"_normalColor": {
"__type__": "cc.Color",
"r": 214,
"g": 214,
"b": 214,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_hoverSprite": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_pressedSprite": {
"__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_disabledSprite": {
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": {
"__id__": 167
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "36ADMzWDFFrJ4Zovw7UC0Q"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "15051raQgZN6J5ICgY2OfSS",
"handler": "close",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "33JGU4WUBFUY+HahE3PBE8",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
@ -3989,7 +4355,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 168 "__id__": 183
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -4017,7 +4383,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 170 "__id__": 185
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -4053,8 +4419,10 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 172 "__id__": 187
}, },
"mask": false,
"maskOpcity": 80,
"frameText": { "frameText": {
"__id__": 19 "__id__": 19
}, },

View File

@ -0,0 +1,846 @@
[
{
"__type__": "cc.Prefab",
"_name": "MainView",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "MainView",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 10
},
{
"__id__": 16
}
],
"_active": true,
"_components": [
{
"__id__": 31
},
{
"__id__": 33
},
{
"__id__": 35
}
],
"_prefab": {
"__id__": 37
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 720,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
}
],
"_prefab": {
"__id__": 9
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 720,
"height": 1280
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8ftYzn1eBL/KI9lfvctDGE"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "72OG0M5ThEtaIaziixD4R1"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 8
},
"_alignFlags": 45,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 720,
"_originalHeight": 720,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8ejneRsd9FXLr6cGBBG0Rk"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "85bQbPz7FPkaRPL/kSAwAE",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "spine",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 13
}
],
"_prefab": {
"__id__": 15
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "57eZ8/fvZJMrM7Wj3WO68q"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 10
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_skeletonData": null,
"defaultSkin": "",
"defaultAnimation": "",
"_premultipliedAlpha": true,
"_timeScale": 1,
"_preCacheMode": -1,
"_cacheMode": 0,
"_defaultCacheMode": 0,
"_sockets": [],
"_useTint": false,
"_debugMesh": false,
"_debugBones": false,
"_debugSlots": false,
"_enableBatch": false,
"loop": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "37W02pxDdPjqDU8/T4AAOl"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "3aPdHbGrlJEpmRvxGxJCdp",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Button",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 17
}
],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 25
},
{
"__id__": 27
}
],
"_prefab": {
"__id__": 30
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -364.234,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 512,
"__editorExtras__": {},
"_parent": {
"__id__": 16
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 18
},
{
"__id__": 20
}
],
"_prefab": {
"__id__": 22
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 17
},
"_enabled": true,
"__prefab": {
"__id__": 19
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a9+SjkwpRBtLeZcty/qH1n"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 17
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_string": "核心战斗",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 1,
"_enableWrapText": false,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2dawV4XTdMuYnCbtT3Cljm"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "69jWhf9aNOtL1KLSUC4G5j",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 16
},
"_enabled": true,
"__prefab": {
"__id__": 24
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "fblznbfCtPipV+qIiTc2gG"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 16
},
"_enabled": true,
"__prefab": {
"__id__": 26
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b6zPpk3tRATK2kgUd5aGfi"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 16
},
"_enabled": true,
"__prefab": {
"__id__": 28
},
"clickEvents": [
{
"__id__": 29
}
],
"_interactable": true,
"_transition": 2,
"_normalColor": {
"__type__": "cc.Color",
"r": 214,
"g": 214,
"b": 214,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_hoverSprite": {
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_pressedSprite": {
"__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_disabledSprite": {
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": {
"__id__": 16
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "81yU6sKR9D5rgF4SxiwMUz"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "b51bfKvsidNPKBbFirAFgQI",
"handler": "onClickHome",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "60FAaYqK9Ia5BCiy9jtGNo",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 32
},
"_contentSize": {
"__type__": "cc.Size",
"width": 720,
"height": 1280
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1dgJxmIH5HIpXD6y0/xMwI"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 34
},
"_alignFlags": 45,
"_target": null,
"_left": 720,
"_right": -720,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "582zBz6m5DKqmkTkiS/LE0"
},
{
"__type__": "b51bfKvsidNPKBbFirAFgQI",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 36
},
"mask": false,
"maskOpcity": 80,
"spine": {
"__id__": 13
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "76LGqkFbVGmYN33BpKxb+5"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "08xLpDDa9NlK3pgR7XiOqb",
"instance": null,
"targetOverrides": null
}
]

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.49",
"importer": "prefab",
"imported": true,
"uuid": "a9de536f-0262-4e1b-92ee-b0c5b27ae808",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "MainView"
}
}

View File

@ -1,12 +0,0 @@
syntax = "proto3";
option java_package = "cn.jisol.ngame.proto";
import "google/protobuf/any.proto";
//
message GDemoMessage {
//
bool isAttack = 1;
//
bool isRun = 2;
}

View File

@ -1,11 +0,0 @@
{
"ver": "1.0.2",
"importer": "text",
"imported": true,
"uuid": "c9f4975a-e568-4d6c-af34-98620327eaf1",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@ -18,16 +18,17 @@ import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSys
import { sp } from "cc"; import { sp } from "cc";
import { SpriteFrame } from "cc"; import { SpriteFrame } from "cc";
import Loading from "../../extensions/ngame/assets/ngame/util/Loading"; import Loading from "../../extensions/ngame/assets/ngame/util/Loading";
import { TB, Tables } from "../resources/config/data/schema"; import { Tables } from "../resources/config/data/schema";
import { JsonAsset } from "cc"; import { JsonAsset } from "cc";
import { GAction } from "./consts/GActionEnum"; import { GAction } from "./consts/GActionEnum";
import { StorageData, StorageEnum } from "./consts/GData"; import { StorageData, StorageEnum } from "./consts/GData";
import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI"; import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI";
import { API } from "./consts/API";
import { AppData } from "./AppData"; import { AppData } from "./AppData";
let APIPath = `https://api.pet.jisol.cn` let APIPath = `http://localhost:8080`
let WsPath = `wss://api.pet.jisol.cn/websocket` let WsPath = `ws://localhost:8080/websocket`
// let APIPath = `https://api.pet.jisol.cn`
// let WsPath = `wss://api.pet.jisol.cn/websocket`
//重写UI //重写UI
class JNGLayer extends JNLayer{ class JNGLayer extends JNLayer{

View File

@ -1,42 +1,32 @@
import SystemBase from "../../extensions/ngame/assets/ngame/system/SystemBase"; import SystemBase from "../../extensions/ngame/assets/ngame/system/SystemBase";
import { app } from "./App"; import { app } from "./App";
import { API, NewsContext, PlayerInfoOV } from "./consts/API"; import BaseData from "./data/BaseData";
import PlayerData from "./data/PlayerData";
import PlayerPetData from "./data/PlayerPetData";
//数据类 (用于初始化游戏信息) //数据类 (用于初始化游戏信息)
export class AppData extends SystemBase{ export class AppData extends SystemBase{
static loading = "AppData"; static loading = "AppData";
//玩家信息 loadings:BaseData[] = [
static PLAYER_INFO:string = "PLAYER_INFO"; PlayerData.getIns(), //玩家信息
PlayerPetData.getIns(), //玩家宠物信息
get loadings():{[key:string]:Function}{ ];
return {
[AppData.PLAYER_INFO]:API.GetPlayerInfo, //玩家信息
}
}
data:{[key:string]:any} = {};
async onInit(): Promise<any> { async onInit(): Promise<any> {
app.loading.setCurrent(AppData.loading); app.loading.setCurrent(AppData.loading);
//加载信息 //初始化所有数据类
let keys = Object.keys(this.loadings); for (let index = 0; index < this.loadings.length; index++) {
for (let index = 0; index < keys.length; index++) { const data = this.loadings[index];
this.data[keys[index]] = (await this.loadings[keys[index]]()); await data.onInit();
} }
app.loading.ok(AppData.loading); app.loading.ok(AppData.loading);
} }
//获取玩家信息
getPlayerInfo():PlayerInfoOV{
return this.data[AppData.PLAYER_INFO];
}
} }

View File

@ -19,9 +19,7 @@ export class Main extends Component {
director.getScene().addChild(instantiate(this.UIPrefab)); director.getScene().addChild(instantiate(this.UIPrefab));
//加载 APP //加载 APP
await JNGame.Init(app,[ await JNGame.Init(app);
{path:"proto/GDemo"}
]);
//发生帧同步开始 //发生帧同步开始
app.socket.Send(JNSyncAction.NSyncFrameStart); app.socket.Send(JNSyncAction.NSyncFrameStart);

View File

@ -39,7 +39,7 @@ export default class GAttackParabolicRemote implements GAttackBase{
return; return;
} }
console.log(`播放动画[GAttackParabolicRemote]`,role.nId,enemy.nId) // console.log(`播放动画[GAttackParabolicRemote]`,role.nId,enemy.nId)
console.log(role.spine,bone); console.log(role.spine,bone);
let bullet = GAttackBullet.create(GButtleDefault,{ let bullet = GAttackBullet.create(GButtleDefault,{

View File

@ -151,7 +151,7 @@ export abstract class GFSMAnimBase extends GFSMBase{
//播放动画 //播放动画
if(!info.track){ if(!info.track){
console.log(`${frame.index} 播放动画-${this.spine.getComponent(GObject).nId}-`,info); // console.log(`${frame.index} 播放动画-${this.spine.getComponent(GObject).nId}-`,info);
info.track = this.spine.setAnimation(this.trackIndex,info.animName,!!info.isLoop); info.track = this.spine.setAnimation(this.trackIndex,info.animName,!!info.isLoop);
this.onStartListener(info.track); this.onStartListener(info.track);
} }

View File

@ -120,7 +120,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
//攻击 //攻击
onAttack(){ onAttack(){
if(!this.fsm.enemy) return; if(!this.fsm.enemy) return;
console.log(`播放动画[${this.nId}] onAttack`,this.fsm.enemy.nId) // console.log(`播放动画[${this.nId}] onAttack`,this.fsm.enemy.nId)
//敌人扣血 //敌人扣血
let info = TD.TbGRoleAttack.get(this.role.id); let info = TD.TbGRoleAttack.get(this.role.id);
(new GAttack[info.attackWay]()).attack(this,info); (new GAttack[info.attackWay]()).attack(this,info);

View File

@ -34,15 +34,25 @@ export interface PlayerInfoOV{
playerCreateTime:number, //玩家创建时间 playerCreateTime:number, //玩家创建时间
novice: false, //是否过引导 novice: false, //是否过引导
} }
export interface PlayerPetOV{
petId:number, //宠物唯一Id
petPlayerId:number; //宠物的玩家Id
petTbId:number; //宠物配置表Id
petGrade:number; //宠物等级
}
export const API = { export const API = {
UserRegister : async () => RData(await app.api.post(`/user/register`)) as UserVO, //玩家注册 UserRegister : async () => RData(await app.api.post(`/user/register`)) as UserVO, //玩家注册
UserLogin : async (account:string,password:string) => RData(await app.api.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO, //玩家登录 UserLogin : async (account:string,password:string) => RData(await app.api.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO, //玩家登录
GetPlayerInfo : async () => RData(await app.api.get(`/game/player/info`),false) as NewsContext, //获取玩家信息 GetPlayerInfo : async () => RData(await app.api.get(`/game/player/info`),false) as PlayerInfoOV, //获取玩家信息
/********** 新手引导接口 *****************/ /********** 新手引导接口 *****************/
SavePlayerInfo : async (playerName:string,novice:boolean = true) => (await app.api.post(`/game/player/info/save`,{playerName,novice})).data as NewsContext, //保存玩家信息 SavePlayerInfo : async (playerName:string,novice:boolean = true) => (await app.api.post(`/game/player/info/save`,{playerName,novice})).data as NewsContext, //保存玩家信息
SelectNovicePet: async (petId:number) => RData(await app.api.post(`/game/novice/select/${petId}`),true), //选择新手引导宠物
/********** 宠物接口 ******************/
GetPlayerPets: async () => RData(await app.api.get(`/game/pet/list`),false) as PlayerPetOV[], //获取玩家全部宠物
} }

View File

@ -1,5 +1,9 @@
import { sys } from "cc"; import { sys } from "cc";
export enum UIPetAnim{
std = "std",
}
export enum StorageEnum{ export enum StorageEnum{
Token = "Storage_Token", // Token Token = "Storage_Token", // Token

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "0265ac40-ac86-4146-990a-88283cb5ac58",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -0,0 +1,11 @@
import Singleton from "../../../extensions/ngame/assets/ngame/util/Singleton";
//数据基类
export default abstract class BaseData extends Singleton {
//初始化
abstract onInit();
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "3cace79b-36b5-4fd4-acfa-88a4b210e3ab",
"files": [],
"subMetas": {},
"userData": {}
}

View 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;
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "58cb2be1-1279-405e-8c89-17a35ca0cd6d",
"files": [],
"subMetas": {},
"userData": {}
}

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();
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "405fd125-2ba1-48b5-bc15-7f6e14569271",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -16,7 +16,6 @@ export class HomeView extends JNGLayerBase {
frameText:Label; frameText:Label;
async onLoad(){ async onLoad(){
app.layer.Open(GUI.Tips,{text:(await API.GetPlayerInfo()).msg});
} }
update(){ update(){

View File

@ -0,0 +1,29 @@
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);
}
}

View File

@ -0,0 +1 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"b51bf2af-b227-4d3c-a05b-162ac0160408","files":[],"subMetas":{},"userData":{}}

View File

@ -35,7 +35,7 @@ export default class LoadingView extends JNGLayerBase {
await NoviceManager.getIns().onStart(); await NoviceManager.getIns().onStart();
//关闭加载页 //关闭加载页
await app.layer.Open(GUI.Home); await app.layer.Open(GUI.Main);
app.layer.Close(GUI.Loading); app.layer.Close(GUI.Loading);
} }

View File

@ -1,5 +1,7 @@
import Singleton from "../../../../extensions/ngame/assets/ngame/util/Singleton"; import Singleton from "../../../../extensions/ngame/assets/ngame/util/Singleton";
import { app } from "../../App"; import { app } from "../../App";
import PlayerData from "../../data/PlayerData";
import PlayerPetData from "../../data/PlayerPetData";
import { GUI } from "../UIConfig"; import { GUI } from "../UIConfig";
export default class NoviceManager extends Singleton{ export default class NoviceManager extends Singleton{
@ -7,11 +9,19 @@ export default class NoviceManager extends Singleton{
//新手引导执行 //新手引导执行
async onStart(){ async onStart(){
if(!(app.data.getPlayerInfo().novice)){ //获取玩家信息是否引导过
if(!(PlayerData.getIns().data.novice)){
//如果没有过引导则打开引导页面 //如果没有过引导则打开引导页面
await app.layer.OpenToClose(GUI.NoviceNamingView); await app.layer.OpenToClose(GUI.NoviceNamingView);
} }
//获取玩家信息是否选择过宠物(有没有宠物)
//如果没有宠物则弹出让玩家选择宠物
if(PlayerPetData.getIns().getData().length == 0){
//没有宠物则弹出选择宠物页面
await app.layer.OpenToClose(GUI.NoviceSelectPetView);
}
console.log("新手引导结束"); console.log("新手引导结束");
} }

View File

@ -1,9 +1,83 @@
import { _decorator, Component, Node } from 'cc'; import { JNGLayerBase, TD, app } from '../../App';
import { JNGLayerBase } from '../../App'; import { TbGGlobalEnum } from '../../../resources/config/TbGGlobalEnum';
import { _decorator,Node } from 'cc';
import { sp } from 'cc';
import { UIPetAnim } from '../../consts/GData';
import { Sprite } from 'cc';
import { Color } from 'cc';
import { API } from '../../consts/API';
import { GUI } from '../UIConfig';
import PlayerPetData from '../../data/PlayerPetData';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('NoviceSelectPetView') @ccclass('NoviceSelectPetView')
export class NoviceSelectPetView extends JNGLayerBase { export class NoviceSelectPetView extends JNGLayerBase {
//选择宠物的节点
@property([Node])
selects:Node[] = [];
//可选择宠物的列表
petIds:number[];
//选择index
index:number = 0;
async onJNLoad(data?: any) {
super.onJNLoad();
//加载配置表 (找到可选择的宠物Id)
let info = TD.TbGGlobal.get(TbGGlobalEnum.SELECT_PET_ID);
this.petIds = JSON.parse(info.args);
//显示宠物
this.selects.forEach((item,index) => {
//获取Spine组件
let spine = item.getComponentInChildren(sp.Skeleton);
//设置显示的角色
spine.skeletonData = app.battleRes.roleSpine[this.petIds[index]];
//全部角色播放等待动画
spine.setAnimation(0,UIPetAnim.std,true);
})
this.onUpdateView();
} }
//更新UI
onUpdateView(){
this.selects.forEach(item => {
item.getComponent(Sprite).color = new Color("8D8D8D");
})
//被选择赋黑
this.selects[this.index].getComponent(Sprite).color = new Color("#000000");
}
//点击选择
onClickSelect(e,data){
let index = parseInt(data);
this.index = index;
//更新UI
this.onUpdateView();
}
//点击确定
async onClickOk(){
//向服务器确认选择
console.log(await PlayerPetData.getIns().SelectNovicePet(this.petIds[this.index]));
app.layer.Open(GUI.Tips,{text:"选择宠物成功 欢迎来到宠物世界..."});
//关闭页面
app.layer.CloseNode(this.node);
}
}

View File

@ -18,6 +18,7 @@ export enum GUI{
NoviceSelectPetView = "NoviceSelectPetView", //新手引导页面 - 选择宠物 NoviceSelectPetView = "NoviceSelectPetView", //新手引导页面 - 选择宠物
Home = "Home", //主页面 Home = "Home", //主页面
Main = "Main", //主页面2
} }
@ -82,6 +83,16 @@ export const UIConfig:{ [key: string]: JNLayerInfo; } = {
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)} backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
}, },
}, },
[GUI.Main]:{
layer:GLayer.View,
uri: "prefab/ui/主页/MainView",
anims:{
front:JNLayerAnim.Enlarge,
back:JNLayerAnim.Smaller,
frontInfo:{key:"position",start:v3(720,0,0),end:v3(0,0,0)},
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
},
},
...UISystemConfig, //系统页面 ...UISystemConfig, //系统页面
...UINoviceConfig, //新手引导页面 ...UINoviceConfig, //新手引导页面
} }

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +0,0 @@
1**** 角色
2**** 角色普攻子弹
3**** 角色攻击特效
4**** 角色技能ID
5**** 角色技能SpineId
6**** 地图Id

View File

@ -1,7 +0,0 @@
GRole - 角色表
GRoleAttack - 角色普攻表
GRoleAttackBullet - 角色普攻子弹表
GRoleAttackEffect - 角色普攻特效表
GRoleSkill - 角色技能表
GRoleSkillEffect - 角色技能特效
GMap - 游戏地图

@ -1 +1 @@
Subproject commit 9731b4de5d3126099e93cb46e5fed636c9c36ee1 Subproject commit f622f919ae737756d4819f542fdcb9b36c50667b

900
JisolGameCocos/package-lock.json generated Normal file
View File

@ -0,0 +1,900 @@
{
"name": "JisolGameCocos",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "JisolGameCocos",
"devDependencies": {
"protobufjs-cli": "^1.1.2"
}
},
"node_modules/@babel/parser": {
"version": "7.23.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz",
"integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jsdoc/salty": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz",
"integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==",
"dev": true,
"dependencies": {
"lodash": "^4.17.21"
},
"engines": {
"node": ">=v12.0.0"
}
},
"node_modules/@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/base64": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/codegen": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/eventemitter": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/fetch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
"dev": true,
"peer": true,
"dependencies": {
"@protobufjs/aspromise": "^1.1.1",
"@protobufjs/inquire": "^1.1.0"
}
},
"node_modules/@protobufjs/float": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/inquire": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/path": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/pool": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
"dev": true,
"peer": true
},
"node_modules/@protobufjs/utf8": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
"dev": true,
"peer": true
},
"node_modules/@types/linkify-it": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz",
"integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==",
"dev": true
},
"node_modules/@types/markdown-it": {
"version": "12.2.3",
"resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz",
"integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==",
"dev": true,
"dependencies": {
"@types/linkify-it": "*",
"@types/mdurl": "*"
}
},
"node_modules/@types/mdurl": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz",
"integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==",
"dev": true
},
"node_modules/@types/node": {
"version": "20.9.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz",
"integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==",
"dev": true,
"peer": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/acorn": {
"version": "8.11.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
"integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true,
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true
},
"node_modules/bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
"dev": true
},
"node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/catharsis": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz",
"integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==",
"dev": true,
"dependencies": {
"lodash": "^4.17.15"
},
"engines": {
"node": ">= 10"
}
},
"node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true
},
"node_modules/deep-is": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
"dev": true
},
"node_modules/entities": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz",
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
"dev": true,
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/escodegen": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
"dev": true,
"dependencies": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1"
},
"bin": {
"escodegen": "bin/escodegen.js",
"esgenerate": "bin/esgenerate.js"
},
"engines": {
"node": ">=4.0"
},
"optionalDependencies": {
"source-map": "~0.6.1"
}
},
"node_modules/escodegen/node_modules/estraverse": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true,
"engines": {
"node": ">=4.0"
}
},
"node_modules/eslint-visitor-keys": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
"integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/espree": {
"version": "9.6.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
"integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
"dev": true,
"dependencies": {
"acorn": "^8.9.0",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true,
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/estraverse": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
"dev": true,
"engines": {
"node": ">=4.0"
}
},
"node_modules/esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"dev": true
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true
},
"node_modules/glob": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"dev": true,
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
"node_modules/js2xmlparser": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz",
"integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==",
"dev": true,
"dependencies": {
"xmlcreate": "^2.0.4"
}
},
"node_modules/jsdoc": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz",
"integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==",
"dev": true,
"dependencies": {
"@babel/parser": "^7.20.15",
"@jsdoc/salty": "^0.2.1",
"@types/markdown-it": "^12.2.3",
"bluebird": "^3.7.2",
"catharsis": "^0.9.0",
"escape-string-regexp": "^2.0.0",
"js2xmlparser": "^4.0.2",
"klaw": "^3.0.0",
"markdown-it": "^12.3.2",
"markdown-it-anchor": "^8.4.1",
"marked": "^4.0.10",
"mkdirp": "^1.0.4",
"requizzle": "^0.2.3",
"strip-json-comments": "^3.1.0",
"underscore": "~1.13.2"
},
"bin": {
"jsdoc": "jsdoc.js"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/klaw": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
"integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.1.9"
}
},
"node_modules/levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
"dev": true,
"dependencies": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/linkify-it": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz",
"integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==",
"dev": true,
"dependencies": {
"uc.micro": "^1.0.1"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"node_modules/long": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==",
"dev": true,
"peer": true
},
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/markdown-it": {
"version": "12.3.2",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz",
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
"dev": true,
"dependencies": {
"argparse": "^2.0.1",
"entities": "~2.1.0",
"linkify-it": "^3.0.1",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"bin": {
"markdown-it": "bin/markdown-it.js"
}
},
"node_modules/markdown-it-anchor": {
"version": "8.6.7",
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz",
"integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==",
"dev": true,
"peerDependencies": {
"@types/markdown-it": "*",
"markdown-it": "*"
}
},
"node_modules/marked": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
"dev": true,
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 12"
}
},
"node_modules/mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
"dev": true
},
"node_modules/minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"dev": true,
"bin": {
"mkdirp": "bin/cmd.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
"dependencies": {
"wrappy": "1"
}
},
"node_modules/optionator": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"dev": true,
"dependencies": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.6",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
"word-wrap": "~1.2.3"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
"dev": true,
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/protobufjs": {
"version": "7.2.5",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz",
"integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==",
"dev": true,
"hasInstallScript": true,
"peer": true,
"dependencies": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
"@protobufjs/codegen": "^2.0.4",
"@protobufjs/eventemitter": "^1.1.0",
"@protobufjs/fetch": "^1.1.0",
"@protobufjs/float": "^1.0.2",
"@protobufjs/inquire": "^1.1.0",
"@protobufjs/path": "^1.1.2",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0",
"@types/node": ">=13.7.0",
"long": "^5.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/protobufjs-cli": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-1.1.2.tgz",
"integrity": "sha512-8ivXWxT39gZN4mm4ArQyJrRgnIwZqffBWoLDsE21TmMcKI3XwJMV4lEF2WU02C4JAtgYYc2SfJIltelD8to35g==",
"dev": true,
"dependencies": {
"chalk": "^4.0.0",
"escodegen": "^1.13.0",
"espree": "^9.0.0",
"estraverse": "^5.1.0",
"glob": "^8.0.0",
"jsdoc": "^4.0.0",
"minimist": "^1.2.0",
"semver": "^7.1.2",
"tmp": "^0.2.1",
"uglify-js": "^3.7.7"
},
"bin": {
"pbjs": "bin/pbjs",
"pbts": "bin/pbts"
},
"engines": {
"node": ">=12.0.0"
},
"peerDependencies": {
"protobufjs": "^7.0.0"
}
},
"node_modules/requizzle": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz",
"integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==",
"dev": true,
"dependencies": {
"lodash": "^4.17.21"
}
},
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/rimraf/node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"dev": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/strip-json-comments": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true,
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/tmp": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
"dev": true,
"dependencies": {
"rimraf": "^3.0.0"
},
"engines": {
"node": ">=8.17.0"
}
},
"node_modules/type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
"dev": true,
"dependencies": {
"prelude-ls": "~1.1.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"dev": true
},
"node_modules/uglify-js": {
"version": "3.17.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
"dev": true,
"bin": {
"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/underscore": {
"version": "1.13.6",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==",
"dev": true
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true,
"peer": true
},
"node_modules/word-wrap": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
"integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true
},
"node_modules/xmlcreate": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz",
"integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==",
"dev": true
},
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
}

View File

@ -3,5 +3,6 @@
"uuid": "7f2de0b9-a399-46ff-847a-61891ca5965c", "uuid": "7f2de0b9-a399-46ff-847a-61891ca5965c",
"creator": { "creator": {
"version": "3.8.1" "version": "3.8.1"
} },
"devDependencies": {}
} }

View File

@ -1,5 +1,5 @@
{ {
"__version__": "1.0.0", "__version__": "1.0.1",
"information": { "information": {
"customSplash": { "customSplash": {
"id": "customSplash", "id": "customSplash",
@ -15,7 +15,7 @@
"label": "removeSplash", "label": "removeSplash",
"enable": true, "enable": true,
"removeSplash": { "removeSplash": {
"complete": false, "complete": true,
"form": "https://creator-api.cocos.com/api/form/show?sid=1b8a08a3e3a81e84a39b39c967858a15" "form": "https://creator-api.cocos.com/api/form/show?sid=1b8a08a3e3a81e84a39b39c967858a15"
} }
} }

View File

@ -5,6 +5,7 @@
/* Add your custom configuration here. */ /* Add your custom configuration here. */
"compilerOptions": { "compilerOptions": {
"strict": false "strict": false,
"allowSyntheticDefaultImports": true, //
} }
} }

@ -1 +1 @@
Subproject commit f3a45363cab5962aed80e50d2f01827b3e7b9704 Subproject commit fe5330b622e0fb50a12808bc832eeb79202c4eb3

View File

@ -0,0 +1,55 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg.TB;
import luban.*;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
public final class TbGGlobal extends AbstractBean {
public TbGGlobal(JsonObject _buf) {
id = _buf.get("id").getAsInt();
args = _buf.get("args").getAsString();
tig = _buf.get("tig").getAsString();
}
public static TbGGlobal deserialize(JsonObject _buf) {
return new cfg.TB.TbGGlobal(_buf);
}
/**
* id
*/
public final int id;
/**
* 全局表参数
*/
public final String args;
/**
* 描述
*/
public final String tig;
public static final int __ID__ = 1682089212;
@Override
public int getTypeId() { return __ID__; }
@Override
public String toString() {
return "{ "
+ "(format_field_name __code_style field.name):" + id + ","
+ "(format_field_name __code_style field.name):" + args + ","
+ "(format_field_name __code_style field.name):" + tig + ","
+ "}";
}
}

View File

@ -19,23 +19,26 @@ public final class Tables
JsonElement load(String file) throws java.io.IOException; JsonElement load(String file) throws java.io.IOException;
} }
private final cfg.TbGGlobal _tbgglobal;
public cfg.TbGGlobal getTbGGlobal() { return _tbgglobal; }
private final cfg.TbGRole _tbgrole; private final cfg.TbGRole _tbgrole;
public cfg.TbGRole getTbGRole() { return _tbgrole; } public cfg.TbGRole getTbGRole() { return _tbgrole; }
private final cfg.TbGMap _tbgmap;
public cfg.TbGMap getTbGMap() { return _tbgmap; }
private final cfg.TbGRoleAttack _tbgroleattack; private final cfg.TbGRoleAttack _tbgroleattack;
public cfg.TbGRoleAttack getTbGRoleAttack() { return _tbgroleattack; } public cfg.TbGRoleAttack getTbGRoleAttack() { return _tbgroleattack; }
private final cfg.TbGRoleBattleRes _tbgrolebattleres; private final cfg.TbGRoleBattleRes _tbgrolebattleres;
public cfg.TbGRoleBattleRes getTbGRoleBattleRes() { return _tbgrolebattleres; } public cfg.TbGRoleBattleRes getTbGRoleBattleRes() { return _tbgrolebattleres; }
private final cfg.TbGRoleSkill _tbgroleskill; private final cfg.TbGRoleSkill _tbgroleskill;
public cfg.TbGRoleSkill getTbGRoleSkill() { return _tbgroleskill; } public cfg.TbGRoleSkill getTbGRoleSkill() { return _tbgroleskill; }
private final cfg.TbGMap _tbgmap;
public cfg.TbGMap getTbGMap() { return _tbgmap; }
public Tables(IJsonLoader loader) throws java.io.IOException { public Tables(IJsonLoader loader) throws java.io.IOException {
_tbgglobal = new cfg.TbGGlobal(loader.load("tbgglobal"));
_tbgrole = new cfg.TbGRole(loader.load("tbgrole")); _tbgrole = new cfg.TbGRole(loader.load("tbgrole"));
_tbgmap = new cfg.TbGMap(loader.load("tbgmap"));
_tbgroleattack = new cfg.TbGRoleAttack(loader.load("tbgroleattack")); _tbgroleattack = new cfg.TbGRoleAttack(loader.load("tbgroleattack"));
_tbgrolebattleres = new cfg.TbGRoleBattleRes(loader.load("tbgrolebattleres")); _tbgrolebattleres = new cfg.TbGRoleBattleRes(loader.load("tbgrolebattleres"));
_tbgroleskill = new cfg.TbGRoleSkill(loader.load("tbgroleskill")); _tbgroleskill = new cfg.TbGRoleSkill(loader.load("tbgroleskill"));
_tbgmap = new cfg.TbGMap(loader.load("tbgmap"));
} }
} }

View File

@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg;
import luban.*;
import com.google.gson.JsonElement;
public final class TbGGlobal {
private final java.util.HashMap<Integer, cfg.TB.TbGGlobal> _dataMap;
private final java.util.ArrayList<cfg.TB.TbGGlobal> _dataList;
public TbGGlobal(JsonElement _buf) {
_dataMap = new java.util.HashMap<Integer, cfg.TB.TbGGlobal>();
_dataList = new java.util.ArrayList<cfg.TB.TbGGlobal>();
for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) {
cfg.TB.TbGGlobal _v;
_v = cfg.TB.TbGGlobal.deserialize(_e_.getAsJsonObject());
_dataList.add(_v);
_dataMap.put(_v.id, _v);
}
}
public java.util.HashMap<Integer, cfg.TB.TbGGlobal> getDataMap() { return _dataMap; }
public java.util.ArrayList<cfg.TB.TbGGlobal> getDataList() { return _dataList; }
public cfg.TB.TbGGlobal get(int key) { return _dataMap.get(key); }
}

View File

@ -1,7 +1,10 @@
package cn.jisol.game.config; package cn.jisol.game.config;
import cn.jisol.game.controller.argsresolver.PlayerMethodArgumentResolver;
import cn.jisol.game.controller.argsresolver.UserMethodArgumentResolver; import cn.jisol.game.controller.argsresolver.UserMethodArgumentResolver;
import cn.jisol.game.controller.game.GPlayerController;
import cn.jisol.game.interceptor.LoginInterceptor; import cn.jisol.game.interceptor.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
@ -12,6 +15,9 @@ import java.util.List;
@Configuration @Configuration
public class WebConfig implements WebMvcConfigurer { public class WebConfig implements WebMvcConfigurer {
@Autowired
GPlayerController playerController;
/** /**
* 添加登录拦截器 * 添加登录拦截器
* @param registry * @param registry
@ -26,5 +32,6 @@ public class WebConfig implements WebMvcConfigurer {
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) { public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
WebMvcConfigurer.super.addArgumentResolvers(resolvers); WebMvcConfigurer.super.addArgumentResolvers(resolvers);
resolvers.add(new UserMethodArgumentResolver()); resolvers.add(new UserMethodArgumentResolver());
resolvers.add(new PlayerMethodArgumentResolver(this.playerController));
} }
} }

View File

@ -0,0 +1,10 @@
package cn.jisol.game.controller.argsresolver;
import java.lang.annotation.*;
@Target({ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CurrentPlayer {
}

View File

@ -0,0 +1,65 @@
package cn.jisol.game.controller.argsresolver;
import cn.jisol.game.controller.exception.PlayerException;
import cn.jisol.game.controller.exception.TokenException;
import cn.jisol.game.controller.game.GPlayerController;
import cn.jisol.game.data.Cache;
import cn.jisol.game.entity.User;
import cn.jisol.game.entity.game.Player;
import cn.jisol.game.service.impl.PlayerServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;
import java.util.Objects;
@Component
public class PlayerMethodArgumentResolver implements HandlerMethodArgumentResolver {
GPlayerController playerController;
public PlayerMethodArgumentResolver(GPlayerController playerController) {
this.playerController = playerController;
}
@Override
public boolean supportsParameter(MethodParameter parameter) {
if (parameter.hasParameterAnnotation(CurrentPlayer.class)) {
return true;
}
return false;
}
@Override
public Object resolveArgument(MethodParameter methodParameter, ModelAndViewContainer modelAndViewContainer, NativeWebRequest nativeWebRequest, WebDataBinderFactory webDataBinderFactory) throws Exception {
//获取Token
String token = nativeWebRequest.getHeader(Cache.KEY_TOKEN);
User user;
Player player;
if(Objects.isNull(token) || Objects.isNull(user = Cache.TOKEN.get(token))){
//抛出Token异常
throw new TokenException();
}
//获取Player
if(Objects.isNull(player = Cache.PLAYER.get(user.getUserId()))){
//如果没有数据则向数据库获取
player = playerController.getPlayerInfo(user).data;
if(Objects.isNull(player)){
//抛出Token异常
throw new TokenException();
}else{
Cache.PLAYER.put(user.getUserId(),player);
}
}
return player;
}
}

View File

@ -0,0 +1,4 @@
package cn.jisol.game.controller.exception;
public class PlayerException extends Exception{
}

View File

@ -0,0 +1,65 @@
package cn.jisol.game.controller.game;
import cfg.TB.TbGGlobal;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONUtil;
import cn.jisol.game.controller.argsresolver.CurrentPlayer;
import cn.jisol.game.data.GlobalIds;
import cn.jisol.game.data.TD;
import cn.jisol.game.entity.game.Player;
import cn.jisol.game.entity.game.PlayerPet;
import cn.jisol.game.service.PlayerPetService;
import cn.jisol.ngame.util.NewsContext;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@Api(value = "JNGameDemo - API", tags = {"新手引导 - API"})
@RestController
@RequestMapping("/game/novice")
@ResponseBody
public class GNoviceController {
@Autowired
PlayerPetService playerPetService;
//选择宠物(前提是玩家没有宠物)
@ApiImplicitParams({})
@ApiOperation(value = "选择宠物(前提是玩家没有宠物)")
@PostMapping("/select/{petId}")
public NewsContext<PlayerPet> select(@CurrentPlayer Player player,@PathVariable Integer petId){
if(Objects.isNull(petId)) return NewsContext.onFail("请选择宠物");
//判断选择的宠物是否在配置表中
TbGGlobal info = TD.DATA.getTbGGlobal().get(GlobalIds.SELECT_PET_ID);
//判断选择的宠物是否在其中
List<Integer> ids = JSONUtil.toList(info.args, Integer.class);
if (!ids.contains(petId)) return NewsContext.onFail("不可选择这个宠物!");
//宠物数量
long petCount = playerPetService.count(
Wrappers.lambdaQuery(PlayerPet.class).eq(PlayerPet::getPetPlayerId,player.getPlayerId())
);
if(petCount > 0){
//玩家已经有宠物了
return NewsContext.onFail("你已经有宠物了!");
}else{
//选择宠物
if (playerPetService.save(PlayerPet.builder().petPlayerId(player.getPlayerId()).petTbId(petId).petGrade(0).build())){
return NewsContext.onSuccess("选择宠物成功");
}else{
return NewsContext.onSuccess("选择宠物失败");
}
}
}
}

View File

@ -12,18 +12,19 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Objects; import java.util.Objects;
/** /**
* 新手API * 玩家
*/ */
@Api(value = "JNGameDemo - API", tags = {"PET - API"}) @Api(value = "JNGameDemo - API", tags = {"PET - API"})
@RestController @RestController
@RequestMapping("/game/player") @RequestMapping("/game/player")
@ResponseBody @ResponseBody
public class PlayerController { public class GPlayerController {
@Autowired @Autowired
PlayerServiceImpl playerService; PlayerServiceImpl playerService;

View File

@ -0,0 +1,49 @@
package cn.jisol.game.controller.game;
import cn.jisol.game.controller.argsresolver.CurrentPlayer;
import cn.jisol.game.controller.argsresolver.CurrentUser;
import cn.jisol.game.entity.User;
import cn.jisol.game.entity.game.Player;
import cn.jisol.game.entity.game.PlayerPet;
import cn.jisol.game.service.PlayerPetService;
import cn.jisol.game.service.impl.PlayerServiceImpl;
import cn.jisol.ngame.util.NewsContext;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 玩家
*/
@Api(value = "JNGameDemo - API", tags = {"PET - API"})
@RestController
@RequestMapping("/game/pet")
@ResponseBody
public class GPlayerPetController {
@Autowired
PlayerPetService playerPetService;
//获取玩家宠物列表
@ApiImplicitParams({})
@ApiOperation(value = "获取玩家宠物列表")
@GetMapping("/list")
public NewsContext<List<PlayerPet>> getPetList(@CurrentPlayer Player player){
return NewsContext.onSuccess("获取成功",
playerPetService.list(
Wrappers.lambdaQuery(PlayerPet.class).eq(PlayerPet::getPetPlayerId,player.getPlayerId())
)
);
}
}

View File

@ -1,6 +1,7 @@
package cn.jisol.game.data; package cn.jisol.game.data;
import cn.jisol.game.entity.User; import cn.jisol.game.entity.User;
import cn.jisol.game.entity.game.Player;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -11,6 +12,7 @@ import java.util.Map;
public class Cache { public class Cache {
public static String KEY_TOKEN = "Token"; public static String KEY_TOKEN = "Token";
public static Map<String, User> TOKEN = new HashMap<>(); public static Map<String, User> TOKEN = new HashMap<>(); //Token
public static Map<Long, Player> PLAYER = new HashMap<>(); //玩家
} }

View File

@ -0,0 +1,8 @@
package cn.jisol.game.data;
public interface GlobalIds {
//选择宠物配置表Id
int SELECT_PET_ID = 70001;
}

View File

@ -15,6 +15,7 @@ import lombok.Data;
public class PlayerPet { public class PlayerPet {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long petId; //宠物唯一Id private Long petId; //宠物唯一Id
private String petTbId; //宠物配置表Id private Long petPlayerId; //宠物的玩家Id
private String petGrade; //宠物等级 private Integer petTbId; //宠物配置表Id
private Integer petGrade; //宠物等级
} }

View File

@ -0,0 +1,10 @@
package cn.jisol.game.mapper;
import cn.jisol.game.entity.game.PlayerPet;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Component;
@Component
public interface PlayerPetMapper extends BaseMapper<PlayerPet> {
}

View File

@ -0,0 +1,8 @@
package cn.jisol.game.service;
import cn.jisol.game.entity.game.PlayerPet;
import com.baomidou.mybatisplus.extension.service.IService;
public interface PlayerPetService extends IService<PlayerPet> {
}

View File

@ -0,0 +1,15 @@
package cn.jisol.game.service.impl;
import cn.jisol.game.entity.game.Player;
import cn.jisol.game.entity.game.PlayerPet;
import cn.jisol.game.mapper.PlayerMapper;
import cn.jisol.game.mapper.PlayerPetMapper;
import cn.jisol.game.service.PlayerPetService;
import cn.jisol.game.service.PlayerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
@Service
public class PlayerPetServiceImpl extends ServiceImpl<PlayerPetMapper, PlayerPet> implements PlayerPetService {
}

View File

@ -0,0 +1,7 @@
[
{
"id": 70001,
"args": "[10004,10001,10002]",
"tig": "新手引导选择宠物[妙蛙种子,小石头,疯狂石头]"
}
]