mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-11-13 09:38:22 +00:00
提交
This commit is contained in:
@@ -61,8 +61,8 @@ namespace JNGame.Sync.State.Tile
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError(e.Message);
|
||||
throw;
|
||||
Debug.LogError($"Error occurred: {e.ToString()}"); // 打印详细的错误信息
|
||||
throw; // 重新抛出异常
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ RenderSettings:
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
@@ -104,7 +103,7 @@ NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
@@ -117,7 +116,7 @@ NavMeshSettings:
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
@@ -154,7 +153,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 473409523}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -236,7 +234,6 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 684387706}
|
||||
m_Father: {fileID: 2084436891}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -368,7 +365,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 528293339}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -450,7 +446,6 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 256183496}
|
||||
m_Father: {fileID: 2084436891}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -584,7 +579,6 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 436121387}
|
||||
m_Father: {fileID: 2084436891}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -718,7 +712,6 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1483726015}
|
||||
m_Father: {fileID: 2084436891}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -850,7 +843,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 329589286}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -930,7 +922,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 629433675}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -1012,7 +1003,6 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1676226601}
|
||||
m_Father: {fileID: 2084436891}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -1144,7 +1134,6 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1499959931}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -1253,13 +1242,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1811865670}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1814915950
|
||||
GameObject:
|
||||
@@ -1347,13 +1336,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1814915950}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &1932244734
|
||||
GameObject:
|
||||
@@ -1395,9 +1384,17 @@ Camera:
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
@@ -1431,13 +1428,13 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1932244734}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2084436886
|
||||
GameObject:
|
||||
@@ -1487,7 +1484,7 @@ MonoBehaviour:
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Bits: 55
|
||||
--- !u!114 &2084436889
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1530,6 +1527,7 @@ Canvas:
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
@@ -1551,10 +1549,17 @@ RectTransform:
|
||||
- {fileID: 528293339}
|
||||
- {fileID: 629433675}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1932244737}
|
||||
- {fileID: 1814915952}
|
||||
- {fileID: 2084436891}
|
||||
- {fileID: 1811865673}
|
||||
|
||||
1
JNFrame2/Assets/Resources/map1.json
Normal file
1
JNFrame2/Assets/Resources/map1.json
Normal file
File diff suppressed because one or more lines are too long
7
JNFrame2/Assets/Resources/map1.json.meta
Normal file
7
JNFrame2/Assets/Resources/map1.json.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1a8cb75f57d978498aa1da8d6859344
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +1,12 @@
|
||||
using AppGame.Systems;
|
||||
using AppGame;
|
||||
using AppGame.Systems;
|
||||
using AppGame.Systems.CServer;
|
||||
using JNGame.Runtime.System;
|
||||
using JNGame.Runtime.Util;
|
||||
using JNGame.Util;
|
||||
using Service;
|
||||
|
||||
namespace AppGame
|
||||
namespace Samples.AppGame
|
||||
{
|
||||
/// <summary>
|
||||
/// App 环境
|
||||
|
||||
@@ -3,54 +3,56 @@ using AppGame.Sync;
|
||||
using Cinemachine;
|
||||
using Game.Input;
|
||||
using JNGame.Runtime;
|
||||
using JNGame;
|
||||
using JNGame.Sync.Debuger;
|
||||
using UnityEngine;
|
||||
|
||||
public class DApplication : MonoBehaviour
|
||||
namespace Samples.AppGame
|
||||
{
|
||||
|
||||
public GameObject Player;
|
||||
public GameObject Boss;
|
||||
public GameObject VWorld;
|
||||
public CinemachineFreeLook FreeLook;
|
||||
|
||||
private async void Awake()
|
||||
public class DApplication : MonoBehaviour
|
||||
{
|
||||
|
||||
await JNetGame.Instance.Init(App.AllSystem());
|
||||
|
||||
//绑定资源
|
||||
App.Resource.Register(VWorld,Player,Boss,FreeLook);
|
||||
|
||||
//开始运行同步
|
||||
if (App.IsServer())
|
||||
|
||||
public GameObject Player;
|
||||
public GameObject Boss;
|
||||
public GameObject VWorld;
|
||||
public CinemachineFreeLook FreeLook;
|
||||
|
||||
private async void Awake()
|
||||
{
|
||||
var tileServer = App.Game.StartServer<JNGTileServerSystem>();
|
||||
JNTileServerDebuger.Instance.Add(tileServer);
|
||||
}
|
||||
if (App.IsSlaveServer()) App.Game.StartServer<JNGTileSlaveServerSystem>();
|
||||
if (App.IsClient()) App.Game.StartClient<JNGTileClientSystem>();
|
||||
|
||||
}
|
||||
await JNetGame.Instance.Init(App.AllSystem());
|
||||
|
||||
public void OnClickPlayerCreate()
|
||||
{
|
||||
var input = App.Game.GetInput<IDWorld>();
|
||||
input.IsPlayerCreate = true;
|
||||
//绑定资源
|
||||
App.Resource.Register(VWorld,Player,Boss,FreeLook);
|
||||
|
||||
//开始运行同步
|
||||
if (App.IsServer())
|
||||
{
|
||||
var tileServer = App.Game.StartServer<JNGTileServerSystem>();
|
||||
JNTileServerDebuger.Instance.Add(tileServer);
|
||||
}
|
||||
if (App.IsSlaveServer()) App.Game.StartServer<JNGTileSlaveServerSystem>();
|
||||
if (App.IsClient()) App.Game.StartClient<JNGTileClientSystem>();
|
||||
|
||||
}
|
||||
|
||||
public void OnClickPlayerCreate()
|
||||
{
|
||||
var input = App.Game.GetInput<IDWorld>();
|
||||
input.IsPlayerCreate = true;
|
||||
}
|
||||
|
||||
public void OnClickBossCreate()
|
||||
{
|
||||
var input = App.Game.GetInput<IDWorld>();
|
||||
input.IsBossCreate = true;
|
||||
}
|
||||
|
||||
public void OnClickButton()
|
||||
{
|
||||
var input = App.Game.GetInput<IDWorld>();
|
||||
input.IsAdd = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void OnClickBossCreate()
|
||||
{
|
||||
var input = App.Game.GetInput<IDWorld>();
|
||||
input.IsBossCreate = true;
|
||||
}
|
||||
|
||||
public void OnClickButton()
|
||||
{
|
||||
var input = App.Game.GetInput<IDWorld>();
|
||||
input.IsAdd = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using JNGame.Runtime.Util;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace AppGame
|
||||
{
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using JNGame.Network.Action;
|
||||
|
||||
namespace AppGame
|
||||
namespace Samples.AppGame
|
||||
{
|
||||
public enum GActionEnum : int
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace AppGame
|
||||
namespace Samples.AppGame
|
||||
{
|
||||
public class GEvent
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace AppGame
|
||||
namespace Samples.AppGame
|
||||
{
|
||||
public class Main : MonoBehaviour
|
||||
{
|
||||
@@ -9,30 +9,30 @@ namespace AppGame
|
||||
public void SetClientEnv()
|
||||
{
|
||||
App.Env = AppEnv.Client;
|
||||
SceneManager.LoadScene(1);
|
||||
SceneManager.LoadScene("JNFrame");
|
||||
}
|
||||
|
||||
public void SetServerEnv()
|
||||
{
|
||||
App.Env = AppEnv.Server;
|
||||
SceneManager.LoadScene(1);
|
||||
SceneManager.LoadScene("JNFrame");
|
||||
}
|
||||
|
||||
public void SetServerClientEnv()
|
||||
{
|
||||
App.Env = AppEnv.ServerClient;
|
||||
SceneManager.LoadScene(1);
|
||||
SceneManager.LoadScene("JNFrame");
|
||||
}
|
||||
|
||||
public void SetSlaveServerEnv()
|
||||
{
|
||||
App.Env = AppEnv.SlaveServer;
|
||||
SceneManager.LoadScene(1);
|
||||
SceneManager.LoadScene("JNFrame");
|
||||
}
|
||||
public void SetSlaveServerClientEnv()
|
||||
{
|
||||
App.Env = AppEnv.SlaveServerClient;
|
||||
SceneManager.LoadScene(1);
|
||||
SceneManager.LoadScene("JNFrame");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ using JNGame.Sync.Frame;
|
||||
using JNGame.Sync.System;
|
||||
using JNGame.Sync.System.Data;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppGame.Sync
|
||||
|
||||
@@ -12,6 +12,7 @@ using JNGame.Sync.State;
|
||||
using JNGame.Sync.System;
|
||||
using JNGame.Sync.System.Data;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace AppGame.Sync
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ using JNGame.Sync.System;
|
||||
using JNGame.Sync.System.Data;
|
||||
using JNGame.Util;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppGame.Sync
|
||||
|
||||
@@ -18,6 +18,7 @@ using JNGame.Sync.System;
|
||||
using JNGame.Sync.System.Data;
|
||||
using JNGame.Util;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppGame.Sync
|
||||
|
||||
@@ -19,6 +19,7 @@ using JNGame.Sync.System;
|
||||
using JNGame.Sync.System.Data;
|
||||
using JNGame.Util;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AppGame.Sync
|
||||
|
||||
@@ -6,6 +6,7 @@ using DotRecast.Core.Collections;
|
||||
using JNGame.Network;
|
||||
using JNGame.Network;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace AppGame.Systems
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using JNGame.Network.Group;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace AppGame.Systems
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using JNGame.Network;
|
||||
using JNGame.Network;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace AppGame.Systems.CServer
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ using JNGame.Sync.State.Tile;
|
||||
using JNGame.Sync.System.Data;
|
||||
using JNGame.Network;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace AppGame.Systems.CServer
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using Cysharp.Threading.Tasks;
|
||||
using DotRecast.Core.Collections;
|
||||
using JNGame.Network;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace AppGame.Systems
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using AppGame.Sync;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using JNGame.Network;
|
||||
using JNGame.Network.Action;
|
||||
using Samples.AppGame;
|
||||
|
||||
public class JNGSocket : JNSocket
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using JNGame.Sync.System;
|
||||
using JNGame.Sync.System.Data;
|
||||
using JNGame.Network.Action;
|
||||
using JNGame.Sync.System.Data.Type;
|
||||
using Samples.AppGame;
|
||||
using TouchSocket.Core;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AppGame;
|
||||
using JNGame.Map;
|
||||
using JNGame.Map.DotRecast.Util;
|
||||
using Samples.AppGame;
|
||||
|
||||
namespace Game.Logic.System.Usual
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using AppGame;
|
||||
using DG.Tweening;
|
||||
using Game.JNGState.Logic.Data;
|
||||
using JNGame.Sync.System;
|
||||
using Samples.AppGame;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game.JNGFrame.View.Entity
|
||||
|
||||
@@ -6,6 +6,7 @@ using Game.JNGState.Logic.Data;
|
||||
using JNGame.Math;
|
||||
using JNGame.Sync.System;
|
||||
using JNGame.Sync.View;
|
||||
using Samples.AppGame;
|
||||
using Service;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using DG.Tweening;
|
||||
using Game.JNGState.Logic.Data;
|
||||
using JNGame.Sync.System;
|
||||
using JNGame.Sync.View;
|
||||
using Samples.AppGame;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game.JNGFrame.View.Entity
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
"GUID:4307f53044263cf4b835bd812fc161a4",
|
||||
"GUID:a035c483e4ff50f4c92f84afd22778cf"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace Service
|
||||
|
||||
public override async Task OnInit()
|
||||
{
|
||||
var map = await Resources.LoadAsync<TextAsset>("Battle/Map/NavMesh/Map_1001.navmesh") as TextAsset;
|
||||
var map2 = await Resources.LoadAsync<TextAsset>("map1") as TextAsset;
|
||||
var map = await Resources.LoadAsync<TextAsset>("Samples/Battle/Map/NavMesh/Map_1001.navmesh") as TextAsset;
|
||||
var map2 = await Resources.LoadAsync<TextAsset>("Samples/map1") as TextAsset;
|
||||
if (map != null) MapData = JsonUtil.ToObject<StaticMapData>(map.text);
|
||||
if (map2 != null) MapData2 = JsonUtil.ToObject<MeshData>(map2.text);
|
||||
if (MapData != null) Debug.Log("加载地图资源完成");
|
||||
|
||||
@@ -6,6 +6,7 @@ using Game.Input;
|
||||
using JNGame.Runtime.Util;
|
||||
using JNGame.Math;
|
||||
using JNGame.Util;
|
||||
using Samples.AppGame;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user