mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
提交
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"isBundle": true
|
||||
"isBundle": true,
|
||||
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt"
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"isBundle": true,
|
||||
"bundleConfigID": "default",
|
||||
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt",
|
||||
"bundleName": "resources",
|
||||
"priority": 8,
|
||||
"compressionType": {},
|
||||
|
@@ -47,22 +47,34 @@
|
||||
},
|
||||
{
|
||||
"__id__": 128
|
||||
},
|
||||
{
|
||||
"__id__": 143
|
||||
},
|
||||
{
|
||||
"__id__": 149
|
||||
},
|
||||
{
|
||||
"__id__": 155
|
||||
},
|
||||
{
|
||||
"__id__": 161
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 143
|
||||
"__id__": 167
|
||||
},
|
||||
{
|
||||
"__id__": 145
|
||||
"__id__": 169
|
||||
},
|
||||
{
|
||||
"__id__": 147
|
||||
"__id__": 171
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 149
|
||||
"__id__": 173
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -3419,6 +3431,554 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "001妙蛙种子",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 144
|
||||
},
|
||||
{
|
||||
"__id__": 146
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 148
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -271.702,
|
||||
"y": -580.56,
|
||||
"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__": 143
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 145
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 643.989990234375,
|
||||
"height": 385.94000244140625
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.6291246759115515,
|
||||
"y": 0.7755350460309831
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "24mjCxtbJAIYhkSGJS2XGL"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 143
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 147
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": {
|
||||
"__uuid__": "29e1c6dc-6549-4f30-ad94-fe92d3cead0c",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "default",
|
||||
"defaultAnimation": "atk",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": 0,
|
||||
"_cacheMode": 0,
|
||||
"_defaultCacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": false,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "02mvi2yPpIvajNGIKqQDxP"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "03QOgvM5ZPaLJxWwx9tYtd",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "guaiA1a",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 150
|
||||
},
|
||||
{
|
||||
"__id__": 152
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 154
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -123.079,
|
||||
"y": -580.56,
|
||||
"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__": 149
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 151
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 84.5999984741211,
|
||||
"height": 116.54000091552734
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.4938534223742009,
|
||||
"y": 0.024026084866309822
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8dVNo47axGpJRFT8NW+dax"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 149
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 153
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": {
|
||||
"__uuid__": "14d2a9b1-50ad-4051-a96a-b1c194651259",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "default",
|
||||
"defaultAnimation": "atk",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": 0,
|
||||
"_cacheMode": 0,
|
||||
"_defaultCacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": false,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "63+7zF/35IIatyyta5jw8G"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "9cYPe89alNLpO1Qn8AI3Y5",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "guaiA1a",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 156
|
||||
},
|
||||
{
|
||||
"__id__": 158
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 160
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 11.611,
|
||||
"y": -580.56,
|
||||
"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__": 155
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 157
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100.08000183105469,
|
||||
"height": 113.76000213623047
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5040967210222901,
|
||||
"y": 0.07770745417182541
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "fdXo7ORJpDv6JVChYlXVuX"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 155
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 159
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": {
|
||||
"__uuid__": "42029fae-0ee0-48c1-b7c5-850c03664ae4",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "default",
|
||||
"defaultAnimation": "atk",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": 0,
|
||||
"_cacheMode": 0,
|
||||
"_defaultCacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": false,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "d8a1mv3UxMQI8rwba1ICfW"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "87tzkjpopJ6YTEDK3Fvt9k",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "guaiA4e",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 162
|
||||
},
|
||||
{
|
||||
"__id__": 164
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 166
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 171.846,
|
||||
"y": -589.848,
|
||||
"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__": 161
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 163
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 162.3699951171875,
|
||||
"height": 188.55999755859375
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5011394050227984,
|
||||
"y": 0.04884387016013313
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "27Mc3b9O5A9b5AOEEyyaCO"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 161
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 165
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": {
|
||||
"__uuid__": "51104c05-e5db-4274-a66e-1de9ab511e4f",
|
||||
"__expectedType__": "sp.SkeletonData"
|
||||
},
|
||||
"defaultSkin": "default",
|
||||
"defaultAnimation": "atk",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": 0,
|
||||
"_cacheMode": 0,
|
||||
"_defaultCacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": false,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "89C5gFHAdBlJbIYn4ncYCm"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "ff9s+mSCdOhIPYSW36LMEs",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@@ -3429,7 +3989,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 144
|
||||
"__id__": 168
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -3457,7 +4017,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 146
|
||||
"__id__": 170
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
@@ -3493,7 +4053,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 148
|
||||
"__id__": 172
|
||||
},
|
||||
"frameText": {
|
||||
"__id__": 19
|
||||
|
@@ -1201,7 +1201,7 @@
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "注册",
|
||||
"_string": "快速注册",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 24,
|
||||
|
@@ -12,7 +12,6 @@ import JNLayerBase from "../../extensions/ngame/assets/ngame/ui/base/JNLayerBase
|
||||
import { EventDispatcher } from "../../extensions/ngame/assets/ngame/util/EventDispatcher";
|
||||
import { JsonLoad, JsonUtil } from "../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
import NGameMessage from "../../extensions/ngame/assets/ngame/util/NGameMessage";
|
||||
import axios from "../../extensions/ngame/assets/plugins/axios.js";
|
||||
import GBattleModeManager from "./battle/GBattleModeManager";
|
||||
import { GLayer, GUI, UIConfig } from "./ui/UIConfig";
|
||||
import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSystem";
|
||||
@@ -23,8 +22,12 @@ import { TB, Tables } from "../resources/config/data/schema";
|
||||
import { JsonAsset } from "cc";
|
||||
import { GAction } from "./consts/GActionEnum";
|
||||
import { StorageData, StorageEnum } from "./consts/GData";
|
||||
import { Axios, Env, JNGame } from "../../extensions/ngame/assets/ngame/JNGame";
|
||||
|
||||
let IP = "kyu.jisol.cn";
|
||||
//设置微信环境
|
||||
JNGame.setEnv(Env.WX);
|
||||
|
||||
let IP = "localhost";
|
||||
|
||||
//重写UI
|
||||
class JNGLayer extends JNLayer{
|
||||
@@ -231,9 +234,10 @@ export const app = {
|
||||
sync : new JNGSyncFrame(), //同步
|
||||
event : EventDispatcher.getIns(), //通知
|
||||
proto : NGameMessage.getIns(), //消息
|
||||
api : axios.create({
|
||||
baseURL: `http://${IP}:8080`,
|
||||
}), //请求
|
||||
// api : Axios.create({
|
||||
// baseURL: `http://${IP}:8080`,
|
||||
// }), //请求
|
||||
// api : {}, //请求
|
||||
battle : GBattleModeManager.getIns(), //战斗
|
||||
config : new JNGConfig(), //配置文件
|
||||
battleRes : new JLoaderBattle("battle"), //battle包
|
||||
@@ -242,4 +246,10 @@ export const app = {
|
||||
[JLoaderBattle.loading]:{title:"加载战斗资源"},
|
||||
[JLoaderBattle.loadingInit]:{title:"初始化战斗资源"},
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
// app.api.interceptors.request.use(function(config){
|
||||
// //设置Token
|
||||
// config.headers.set("Token",StorageData.get(StorageEnum.Token));
|
||||
// return config;
|
||||
// })
|
@@ -1,6 +1,6 @@
|
||||
import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
|
||||
import { app } from './App';
|
||||
import { JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
||||
import { Env, JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
||||
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
@@ -13,6 +13,11 @@ const RData = (data:any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export interface NewsContext{
|
||||
state:number,
|
||||
msg:string,
|
||||
data:any,
|
||||
}
|
||||
export interface UserVO{
|
||||
userId:number, //玩家Id
|
||||
userName:string, //玩家名称
|
||||
@@ -25,8 +30,9 @@ export interface UserLoginVO{
|
||||
|
||||
export const API = {
|
||||
|
||||
UserRegister : async () => RData(await http.post(`/user/register`)) as UserVO,
|
||||
UserLogin : async (account:string,password:string) => RData(await http.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO,
|
||||
UserRegister : async () => RData(await http.post(`/user/register`)) as UserVO, //玩家注册
|
||||
UserLogin : async (account:string,password:string) => RData(await http.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO, //玩家登录
|
||||
GetPlayerInfo : async () => (await http.get(`/game/player/info`)).data as NewsContext, //获取玩家信息
|
||||
|
||||
}
|
||||
|
||||
|
@@ -6,6 +6,7 @@ import { director } from 'cc';
|
||||
import { WorldCanvas } from '../../WorldCanvas';
|
||||
import { StorageData, StorageEnum } from '../../consts/GData';
|
||||
import { GUI } from '../UIConfig';
|
||||
import { API } from '../../consts/API';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HomeView')
|
||||
@@ -14,6 +15,10 @@ export class HomeView extends JNGLayerBase {
|
||||
@property(Label)
|
||||
frameText:Label;
|
||||
|
||||
async onLoad(){
|
||||
app.layer.Open(GUI.Tips,{text:(await API.GetPlayerInfo()).msg});
|
||||
}
|
||||
|
||||
update(){
|
||||
this.frameText.string = `当前帧数: ${app.sync.frame}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user