mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
42
JNFrame2/Assets/Scripts/Samples/Debug/MapVisualize.cs
Normal file
42
JNFrame2/Assets/Scripts/Samples/Debug/MapVisualize.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using JNGame.PathFinding;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Lockstep.Game
|
||||
{
|
||||
/// <summary>
|
||||
/// 地图调试可视化
|
||||
/// </summary>
|
||||
public class MapVisualize : MonoBehaviour
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
public bool isDrawMap;
|
||||
|
||||
public void DebugVisualize()
|
||||
{
|
||||
// if (GSystem.Root == null) { return; }
|
||||
|
||||
// var Map = GSystem.Root.GetService<DemoMapService>()?.Map;
|
||||
//
|
||||
// if (Map is not null)
|
||||
// {
|
||||
// BspTree.s_DebugMat = Resources.Load<Material>("WhiteMat");
|
||||
// BspTree.s_DebugTrans = gameObject.transform;
|
||||
// Map.DebugVisualize();
|
||||
// }
|
||||
}
|
||||
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
// if (GSystem.Root == null) { return; }
|
||||
|
||||
// var Map = GSystem.Root.GetService<DemoMapService>()?.Map;
|
||||
//
|
||||
// if (Map is not null && isDrawMap)
|
||||
// {
|
||||
// // 绘制地图
|
||||
// Map.DrawGizmos();
|
||||
// }
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79b9341e6e6b4b3da75d6f4383242e1d
|
||||
timeCreated: 1715242605
|
Reference in New Issue
Block a user