|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Unity.VisualScripting; |
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine.UI; |
|
|
|
using UnityEngine.UIElements; |
|
|
|
@ -97,13 +98,14 @@ public class getNodeTools |
|
|
|
} |
|
|
|
|
|
|
|
public static void checkListPass(List<MapUnity> mapUnityList) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
for (int i = 0; i < mapUnityList.Count; i++) |
|
|
|
{ |
|
|
|
Debug.Log( "X是:" + mapUnityList[i].locationX + "Y是:" + mapUnityList[i].locationY); |
|
|
|
if (!checkNodePass(mapUnityList[i])) |
|
|
|
{ |
|
|
|
mapUnityList.RemoveAt(i); |
|
|
|
mapUnityList.Remove(mapUnityList[i]); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
@ -125,10 +127,10 @@ public class getNodeTools |
|
|
|
{ |
|
|
|
canPass = false; |
|
|
|
} |
|
|
|
/* if (!canPass) |
|
|
|
{*/ |
|
|
|
Debug.Log("距离是" + distance + ",结果是:" + canPass+",角度是:"+dir); |
|
|
|
//}
|
|
|
|
if (mapUnity.locationX==1&& mapUnity.locationY==5) |
|
|
|
{ |
|
|
|
Debug.Log("距离是" + distance + ",结果是:" + canPass + ",角度是:" + dir + " " + layerMask.value + "ray是" + ray + "X是:" + mapUnity.locationX + "Y是:" + mapUnity.locationY); |
|
|
|
} |
|
|
|
return canPass; |
|
|
|
|
|
|
|
} |
|
|
|
|