Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
f429f9c2a2
|
@ -2380,6 +2380,11 @@ PrefabInstance:
|
|||
propertyPath: m_ReceiveShadows
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 302957159522640772, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: ad9b6f211aa7f56408a0fc152bd1acde, type: 2}
|
||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
|
|
@ -479,7 +479,7 @@ GameObject:
|
|||
- component: {fileID: 3231389817124393935}
|
||||
- component: {fileID: 6644830064356880066}
|
||||
m_Layer: 11
|
||||
m_Name: "\u65E0\u4EBA\u673AList"
|
||||
m_Name: "\u65E0\u4EBA\u673AList\uFF0830\u53F0\u5907\u4EFD\uFF09"
|
||||
m_TagString: WRJ
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -723,6 +723,9 @@ MonoBehaviour:
|
|||
dataLinkCommunicationFrequency: 1
|
||||
electronicReconnaissanceCapability: 1
|
||||
opticalReconnaissanceCapability: 1
|
||||
FrequencyBand: {fileID: 0}
|
||||
SurveillanceFrequencyBand: {fileID: 0}
|
||||
gamePos: {fileID: 0}
|
||||
attackColliders1: []
|
||||
currentCollider: {fileID: 0}
|
||||
layerMask:
|
||||
|
@ -24324,6 +24327,11 @@ PrefabInstance:
|
|||
propertyPath: m_ReceiveShadows
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 302957159522640772, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
objectReference: {fileID: 2100000, guid: ad9b6f211aa7f56408a0fc152bd1acde, type: 2}
|
||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
|
|
@ -291,7 +291,7 @@ Transform:
|
|||
m_GameObject: {fileID: 1001764166187808509}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 100, z: 0}
|
||||
m_LocalScale: {x: 15, y: 1, z: 15}
|
||||
m_LocalScale: {x: 5, y: 1, z: 5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8425345772495695667}
|
||||
m_RootOrder: 4
|
||||
|
@ -322,7 +322,7 @@ MeshRenderer:
|
|||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: ad9b6f211aa7f56408a0fc152bd1acde, type: 2}
|
||||
- {fileID: 2100000, guid: fab1af0a71fe5d3449ce6da2d955f1d4, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
|
|
@ -1860,7 +1860,7 @@ Transform:
|
|||
m_GameObject: {fileID: 5062416000507490738}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 100, z: 0}
|
||||
m_LocalScale: {x: 15, y: 1, z: 15}
|
||||
m_LocalScale: {x: 5, y: 1, z: 5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8425345772495695667}
|
||||
m_RootOrder: 4
|
||||
|
@ -1891,7 +1891,7 @@ MeshRenderer:
|
|||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: ad9b6f211aa7f56408a0fc152bd1acde, type: 2}
|
||||
- {fileID: 2100000, guid: fab1af0a71fe5d3449ce6da2d955f1d4, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
|
|
@ -216,7 +216,7 @@ Transform:
|
|||
m_GameObject: {fileID: 1634967572523846151}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 100, z: 0}
|
||||
m_LocalScale: {x: 15, y: 1, z: 15}
|
||||
m_LocalScale: {x: 5, y: 1, z: 5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8425345772495695667}
|
||||
m_RootOrder: 4
|
||||
|
@ -247,7 +247,7 @@ MeshRenderer:
|
|||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: ad9b6f211aa7f56408a0fc152bd1acde, type: 2}
|
||||
- {fileID: 2100000, guid: fab1af0a71fe5d3449ce6da2d955f1d4, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using AdamThinkDevicesData;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -90,8 +91,14 @@ public class Spectrumdetection : MonoBehaviour
|
|||
/// 摄像机显示层数
|
||||
/// </summary>
|
||||
public Camera camera;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public RawImage rawImage;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private bool onlyOne = true;
|
||||
void Start()
|
||||
{
|
||||
spectrumdetections.Add(this);
|
||||
|
@ -101,9 +108,18 @@ public class Spectrumdetection : MonoBehaviour
|
|||
OnActivationChanged += OnActivationChangedHandler;
|
||||
_isStartRehearsing = GlobalFlag.isStartRehearsing;
|
||||
Microwave();
|
||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
|
||||
//DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
||||
{
|
||||
onlyOne = false;
|
||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, rawImage);
|
||||
}
|
||||
Search();//微波武器朝向无人机
|
||||
}
|
||||
private void Microwave()
|
||||
{
|
||||
frenbutton.onClick.AddListener(() =>
|
||||
|
@ -341,11 +357,6 @@ public class Spectrumdetection : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
Search();//微波武器朝向无人机
|
||||
//Emittedray();
|
||||
}
|
||||
/// <summary>
|
||||
/// 点击物体生成页面
|
||||
/// </summary>
|
||||
|
|
|
@ -150,7 +150,10 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
|||
/// 激光火炮打击时间
|
||||
/// </summary>
|
||||
public float storageIntervalTime;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private bool onlyOne = true;
|
||||
/// <summary>
|
||||
/// 判断物体是否在相机里面
|
||||
/// </summary>
|
||||
|
@ -159,7 +162,6 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
|||
{
|
||||
equipmentCommon = GetComponent<EquipmentCommon>();
|
||||
laserFireControlPlatformMangers.Add(this);
|
||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, raw);
|
||||
//生成激光
|
||||
GameObject _InnerLaserlineRenderer = Instantiate(InnerLaserlineRendererPrefab);
|
||||
_InnerLaserlineRenderer.transform.position = Vector3.zero;
|
||||
|
@ -181,34 +183,18 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
|||
OuterLaserlineRenderer.SetPosition(0, LaserPoint.transform.position);// 设置线段起点为物体位置
|
||||
OuterLaserlineRenderer.SetPosition(1, LaserPoint.transform.position);// 设置线段终点为目标点
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
lasertime -= Time.deltaTime;
|
||||
|
||||
//if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0" && Input.GetMouseButtonDown(0))
|
||||
//{
|
||||
// Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
|
||||
// RaycastHit hit;
|
||||
// if (Physics.Raycast(ray, out hit))
|
||||
// {
|
||||
// if (EventSystem.current.IsPointerOverGameObject())
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
// if (hit.transform.gameObject.tag == "AttackTarget" && hit.transform.GetComponent<LaserFireControlPlatformManger>())
|
||||
// {
|
||||
// Transform canvas = GameObject.Find("Canvas").transform;
|
||||
// if (canvas)
|
||||
// {
|
||||
// Instantiate(RawImage, canvas);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
||||
{
|
||||
onlyOne = false;
|
||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, camera, raw);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -463,7 +449,8 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
|||
//{
|
||||
// Instantiate(RawImage, canvas);
|
||||
//}
|
||||
rawImageUIObj.SetActive(true);
|
||||
if (GlobalFlag.blueOrRed == 1)
|
||||
rawImageUIObj.SetActive(true);
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查鼠标是否离开物体
|
||||
|
|
|
@ -123,8 +123,14 @@ public class RadarManger : MonoBehaviour
|
|||
/// 激活面板预设体
|
||||
/// </summary>
|
||||
public Image imageprs;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public RawImage rawImage;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private bool onlyOne = true;
|
||||
void Awake()
|
||||
{
|
||||
|
||||
|
@ -136,9 +142,17 @@ public class RadarManger : MonoBehaviour
|
|||
|
||||
// 订阅布尔值变化事件
|
||||
OnActivationChanged += OnActivationChangedHandler;
|
||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
||||
//DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (onlyOne && equipmentCommon.deviceID.Length > 10)
|
||||
{
|
||||
onlyOne = false;
|
||||
DroneViewDisplay.Instance.CreateUI(equipmentCommon.deviceID, minCamera, rawImage);
|
||||
}
|
||||
}
|
||||
#region 启动暂停
|
||||
/// <summary>
|
||||
/// 导条变化调用
|
||||
|
|
|
@ -126,6 +126,9 @@ public class DroneViewDisplay : MonoSingleton<DroneViewDisplay>
|
|||
/// <param name="rawImage"></param>
|
||||
public void CreateUI(string deviceID,Camera camera,RawImage rawImage)
|
||||
{
|
||||
if (deviceID.Length < 10) return;
|
||||
var v= renderTextures.Find(x=>x.name== deviceID);
|
||||
if (v != null) return;
|
||||
RenderTexture renderTexture = new RenderTexture(500, 500, 0);
|
||||
renderTexture.name = deviceID;
|
||||
camera.targetTexture = renderTexture;
|
||||
|
|
Loading…
Reference in New Issue