Compare commits
No commits in common. "d07e9a6e370da89dfaeae2b931b6e504c7dba7a0" and "a7f29ce501e263debec9f3ff1f940b396283bc63" have entirely different histories.
d07e9a6e37
...
a7f29ce501
|
|
@ -6,7 +6,7 @@ AnimationClip:
|
|||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: RadarNew
|
||||
m_Name: Radar
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 1113159741}
|
||||
m_IndirectSpecularColor: {r: 0.16235614, g: 0.30591527, b: 0.66776896, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.16207841, g: 0.30599776, b: 0.6701277, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
|
@ -25857,7 +25857,7 @@ PrefabInstance:
|
|||
- target: {fileID: 1640552070326309401, guid: 4917651f381dd774e933facd31452d35,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 7
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1640552070326309401, guid: 4917651f381dd774e933facd31452d35,
|
||||
type: 3}
|
||||
|
|
@ -49760,8 +49760,6 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
wrjMenuSetPanel: {fileID: 729007801}
|
||||
canvasRect: {fileID: 147647011}
|
||||
eventsystem: {fileID: 1768340610}
|
||||
RaycastInCanvas: {fileID: 147647008}
|
||||
--- !u!114 &1436809532
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -64226,7 +64224,7 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
randSeed: 16312687
|
||||
randSeed: 273660937
|
||||
isDoingTransition: 0
|
||||
minimumHeight: 0
|
||||
--- !u!114 &1820978574
|
||||
|
|
@ -89162,7 +89160,7 @@ PrefabInstance:
|
|||
- target: {fileID: 3494968556799403173, guid: c20b9fea41a9bce4e8780bab3d0e13f9,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3494968556799403173, guid: c20b9fea41a9bce4e8780bab3d0e13f9,
|
||||
type: 3}
|
||||
|
|
@ -90820,7 +90818,7 @@ PrefabInstance:
|
|||
- target: {fileID: 5856212116958320594, guid: eed0736c9868e994ebeff87ecef8c23e,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 5
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5856212116958320594, guid: eed0736c9868e994ebeff87ecef8c23e,
|
||||
type: 3}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Assets.Zion.Scripts.Adam
|
||||
{
|
||||
|
|
@ -27,25 +25,16 @@ namespace Assets.Zion.Scripts.Adam
|
|||
RaycastHit hitInfo;
|
||||
if (Physics.Raycast(ray, out hitInfo, 1000))
|
||||
{
|
||||
if (CheckGuiRaycastObjects()) return;
|
||||
EquipmentCommon ec = hitInfo.collider.GetComponent<EquipmentCommon>();
|
||||
if (ec != null && ec.isPlayer)
|
||||
{
|
||||
if (hitInfo.collider.tag == "WRJ" )
|
||||
if (hitInfo.collider.tag == "WRJ")
|
||||
{
|
||||
wrjMenuSetPanel.localScale = Vector3.one;
|
||||
Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject);
|
||||
wrjMenuSetPanel.gameObject.SetActive(true);
|
||||
wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
wrjMenuSetPanel.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wrjMenuSetPanel.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -55,21 +44,9 @@ namespace Assets.Zion.Scripts.Adam
|
|||
}
|
||||
|
||||
}
|
||||
public EventSystem eventsystem;
|
||||
public GraphicRaycaster RaycastInCanvas;
|
||||
/// <summary>
|
||||
/// UI 防穿透
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool CheckGuiRaycastObjects()
|
||||
{
|
||||
PointerEventData eventData = new PointerEventData(eventsystem);
|
||||
eventData.pressPosition = Input.mousePosition;
|
||||
eventData.position = Input.mousePosition;
|
||||
List<RaycastResult> list = new List<RaycastResult>();
|
||||
RaycastInCanvas.Raycast(eventData, list);
|
||||
return list.Count > 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Vector3 GetScreenPosition(GameObject target)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue