Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
d77afc8e5b
|
@ -32,8 +32,8 @@ Material:
|
||||||
- _dispStrength: 1
|
- _dispStrength: 1
|
||||||
- _overBright: 1
|
- _overBright: 1
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- _AmbientTint: {r: 0, g: 0, b: 0, a: 1}
|
- _AmbientTint: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _Color: {r: 0.25, g: 0.25, b: 0.25, a: 0.040000003}
|
- _Color: {r: 0.5, g: 0.49803922, b: 0.49215686, a: 0.2}
|
||||||
- _GlowColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
- _GlowColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
||||||
- _PrimaryTint: {r: 1, g: 1, b: 1, a: 1}
|
- _PrimaryTint: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
|
|
@ -355,6 +355,7 @@ MonoBehaviour:
|
||||||
FireSpeed: 20
|
FireSpeed: 20
|
||||||
detectionRadius: 50
|
detectionRadius: 50
|
||||||
isEngagedTarget: 0
|
isEngagedTarget: 0
|
||||||
|
gxWRJCamera: {fileID: 6382256847466738257}
|
||||||
batteryLife: 1
|
batteryLife: 1
|
||||||
classificationWindResistance: 1
|
classificationWindResistance: 1
|
||||||
maximumFlyingSpeed: 1
|
maximumFlyingSpeed: 1
|
||||||
|
@ -363,6 +364,89 @@ MonoBehaviour:
|
||||||
dataLinkCommunicationFrequency: 1
|
dataLinkCommunicationFrequency: 1
|
||||||
electronicReconnaissanceCapability: 1
|
electronicReconnaissanceCapability: 1
|
||||||
opticalReconnaissanceCapability: 1
|
opticalReconnaissanceCapability: 1
|
||||||
|
--- !u!1 &7326748669528570608
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8245684177115831463}
|
||||||
|
- component: {fileID: 6382256847466738257}
|
||||||
|
- component: {fileID: 4942465351206027101}
|
||||||
|
m_Layer: 11
|
||||||
|
m_Name: Camera
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &8245684177115831463
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7326748669528570608}
|
||||||
|
m_LocalRotation: {x: 0.17382409, y: -0, z: -0, w: 0.98477674}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0.173}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 5512074156260461627}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 20.02, y: 0, z: 0}
|
||||||
|
--- !u!20 &6382256847466738257
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7326748669528570608}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!81 &4942465351206027101
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7326748669528570608}
|
||||||
|
m_Enabled: 1
|
||||||
--- !u!1001 &87581316664468991
|
--- !u!1001 &87581316664468991
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -6449,12 +6533,6 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
||||||
--- !u!4 &8539805826321748420 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1752211167157593052}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!114 &361993472053131937 stripped
|
--- !u!114 &361993472053131937 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
@ -6467,6 +6545,12 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &8539805826321748420 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 1752211167157593052}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &1770522258813735065
|
--- !u!1001 &1770522258813735065
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -12553,12 +12637,6 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
||||||
--- !u!4 &5167349154997552048 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 2982643334479475112}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!114 &3761472913846298837 stripped
|
--- !u!114 &3761472913846298837 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
@ -12571,6 +12649,12 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &5167349154997552048 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2982643334479475112}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &3048292988923725988
|
--- !u!1001 &3048292988923725988
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -16913,12 +16997,6 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
||||||
--- !u!4 &2499279008215596091 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 5511666963674910243}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!114 &5848568455846123358 stripped
|
--- !u!114 &5848568455846123358 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
@ -16931,6 +17009,12 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &2499279008215596091 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 5511666963674910243}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &5521732607769453082
|
--- !u!1001 &5521732607769453082
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -18657,12 +18741,6 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
||||||
--- !u!4 &2577865565644119590 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 5554079564960066622}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!114 &5783492806809580867 stripped
|
--- !u!114 &5783492806809580867 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
@ -18675,6 +18753,12 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &2577865565644119590 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 5554079564960066622}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &6233801842401300491
|
--- !u!1001 &6233801842401300491
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -24856,12 +24940,6 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
||||||
--- !u!4 &1611324478266105742 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 8687151149057306006}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!114 &7339143432620078315 stripped
|
--- !u!114 &7339143432620078315 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
@ -24874,6 +24952,12 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &1611324478266105742 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 8687151149057306006}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1001 &8867769748213934429
|
--- !u!1001 &8867769748213934429
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -26600,12 +26684,6 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
|
||||||
--- !u!4 &1550832753322196951 stripped
|
|
||||||
Transform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 8887797578038627791}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!114 &7350113383591171250 stripped
|
--- !u!114 &7350113383591171250 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
@ -26618,3 +26696,9 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &1550832753322196951 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 8887797578038627791}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
192.168.107.15:48888
|
127.0.0.1:48888
|
|
@ -1 +1 @@
|
||||||
192.168.107.15
|
127.0.0.1
|
|
@ -80,6 +80,47 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
devices.Add(d);
|
devices.Add(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取光学无人机和自杀式无人机
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<UnmannedAerialVehicleManage> GetGXWRJAndZSWRJ()
|
||||||
|
{
|
||||||
|
List<UnmannedAerialVehicleManage> tempUAM = new List<UnmannedAerialVehicleManage>();
|
||||||
|
for (int i = 0; i < devices.Count; i++)
|
||||||
|
{
|
||||||
|
if (devices[i] != null && devices[i].gameObject.name.Contains("无人机"))
|
||||||
|
{
|
||||||
|
UnmannedAerialVehicleManage temp = devices[i].GetComponent<UnmannedAerialVehicleManage>();
|
||||||
|
if (temp != null)
|
||||||
|
{
|
||||||
|
if (temp.wrjModel == WRJModel.光学无人机 || temp.wrjModel == WRJModel.自杀式无人机)
|
||||||
|
tempUAM.Add(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tempUAM;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetCollider4WRJ(List<Collider> attackColliders)
|
||||||
|
{
|
||||||
|
int _number = Random.Range(0, attackColliders.Count - 1);
|
||||||
|
if (attackColliders.Count > 0)
|
||||||
|
{
|
||||||
|
List<UnmannedAerialVehicleManage> temp = GetGXWRJAndZSWRJ();
|
||||||
|
for (int i = 0; i < temp.Count; i++)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < temp[i].unmannedAerialVehicles.Count; j++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(temp[i].unmannedAerialVehicles[j] != null && temp[i].unmannedAerialVehicles[j].gameObject.activeSelf)
|
||||||
|
{
|
||||||
|
temp[i].unmannedAerialVehicles[j].AttAck(attackColliders[_number].transform);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void GetSend2roomMsg(string data)
|
public void GetSend2roomMsg(string data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -377,8 +377,14 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
if (device.GetComponent<UnmannedAerialVehicleManage>())
|
if (device.GetComponent<UnmannedAerialVehicleManage>())
|
||||||
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
|
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
||||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
|
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
|
||||||
|
Debug.Log($"<color=yellow>是否是player{data.r3 == GlobalFlag.currentUser.user_id}</color>");
|
||||||
|
if (data.r3 == GlobalFlag.currentUser.user_id)
|
||||||
|
{
|
||||||
|
device.GetComponent<EquipmentCommon>().isPlayer = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnGetRoomUsers(string obj)
|
private void OnGetRoomUsers(string obj)
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
replaceInfoDic.Add("r1", $"{transform.position.x},{transform.position.y},{transform.position.z},{transform.eulerAngles.x},{transform.eulerAngles.y},{transform.eulerAngles.z}");
|
replaceInfoDic.Add("r1", $"{transform.position.x},{transform.position.y},{transform.position.z},{transform.eulerAngles.x},{transform.eulerAngles.y},{transform.eulerAngles.z}");
|
||||||
if (gameObject.GetComponent<UnmannedAerialVehicleManage>())
|
if (gameObject.GetComponent<UnmannedAerialVehicleManage>())
|
||||||
replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
|
replaceInfoDic.Add("r2", ((int)gameObject.GetComponent<UnmannedAerialVehicleManage>().wrjModel).ToString());
|
||||||
//replaceInfoDic.Add("r3",);
|
replaceInfoDic.Add("r3", GlobalFlag.currentUser.user_id);
|
||||||
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
|
StartCoroutine(AsyncWebReq.PostData2(Url_AddDeviceAndGetDeviceId, replaceInfoDic, ResultsInfo =>
|
||||||
{
|
{
|
||||||
ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);
|
ReturnDeviceID returnID = JsonConvert.DeserializeObject<ReturnDeviceID>(ResultsInfo);
|
||||||
|
|
|
@ -252,7 +252,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Action<List<Collider>> WRJAttach;
|
||||||
public void SwitchWRJModel()
|
public void SwitchWRJModel()
|
||||||
{
|
{
|
||||||
gxWRJCamera.gameObject.SetActive(false);
|
gxWRJCamera.gameObject.SetActive(false);
|
||||||
|
@ -262,6 +262,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
gxWRJCamera.gameObject.SetActive(true);
|
gxWRJCamera.gameObject.SetActive(true);
|
||||||
break;
|
break;
|
||||||
case WRJModel.电子侦察无人机:
|
case WRJModel.电子侦察无人机:
|
||||||
|
WRJAttach += SetCollider4WRJ;
|
||||||
break;
|
break;
|
||||||
case WRJModel.自杀式无人机:
|
case WRJModel.自杀式无人机:
|
||||||
break;
|
break;
|
||||||
|
@ -275,30 +276,44 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
private void SelectiveAttackDrone()
|
private void SelectiveAttackDrone()
|
||||||
{
|
{
|
||||||
if (isEngagedTarget) return;
|
if (isEngagedTarget) return;
|
||||||
|
if (wrjModel == WRJModel.电子侦察无人机 || wrjModel == WRJModel.光学无人机)
|
||||||
|
{
|
||||||
List<Collider> colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
List<Collider> colliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
|
||||||
List<Collider> colliders1 = new List<Collider>();
|
List<Collider> attackColliders1 = new List<Collider>();
|
||||||
for (int i = 0; i < colliders.Count; i++)
|
for (int i = 0; i < colliders.Count; i++)
|
||||||
{
|
{
|
||||||
if (colliders[i].transform.tag == "AttackTarget")
|
if (colliders[i].transform.tag == "AttackTarget")
|
||||||
colliders1.Add(colliders[i]);
|
attackColliders1.Add(colliders[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wrjModel == WRJModel.光学无人机)
|
||||||
|
{
|
||||||
if (colliders1.Count > 0)
|
if (attackColliders1.Count > 0)
|
||||||
{
|
{
|
||||||
isEngagedTarget = true;
|
isEngagedTarget = true;
|
||||||
//colliders1.ForEach(x => Debug.Log(x.transform.name));
|
//colliders1.ForEach(x => Debug.Log(x.transform.name));
|
||||||
int _number = UnityEngine.Random.Range(0, colliders1.Count - 1);
|
int _number = UnityEngine.Random.Range(0, attackColliders1.Count - 1);
|
||||||
List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null && x.gameObject.activeSelf);
|
List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null && x.gameObject.activeSelf);
|
||||||
SendMsg(colliders1[_number].transform);
|
SendMsg(attackColliders1[_number].transform);
|
||||||
for (int i = 0; i < _unmannedAerialVehicles.Count; i++)
|
for (int i = 0; i < _unmannedAerialVehicles.Count; i++)
|
||||||
{
|
{
|
||||||
_unmannedAerialVehicles[i].AttAck(colliders1[_number].transform);
|
_unmannedAerialVehicles[i].AttAck(attackColliders1[_number].transform);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wrjModel == WRJModel.电子侦察无人机)
|
||||||
|
{
|
||||||
|
WRJAttach.Invoke(attackColliders1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetCollider4WRJ(List<Collider> attackColliders)
|
||||||
|
{
|
||||||
|
DeviceManager.Instance.SetCollider4WRJ(attackColliders);
|
||||||
|
}
|
||||||
|
|
||||||
public void SendMsg(Transform attackTarget)
|
public void SendMsg(Transform attackTarget)
|
||||||
{
|
{
|
||||||
string nowData = GetSyncData(attackTarget);
|
string nowData = GetSyncData(attackTarget);
|
||||||
|
@ -444,6 +459,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(currentSceneInfo.EnvWindSpeed))
|
||||||
|
{
|
||||||
///根据风得速度改变无人机得速度
|
///根据风得速度改变无人机得速度
|
||||||
FireSpeed = float.Parse(maximumFlyingSpeed) / float.Parse(currentSceneInfo.EnvWindSpeed);
|
FireSpeed = float.Parse(maximumFlyingSpeed) / float.Parse(currentSceneInfo.EnvWindSpeed);
|
||||||
/////如果风速大于6级,无人机停止飞行
|
/////如果风速大于6级,无人机停止飞行
|
||||||
|
@ -451,17 +468,21 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
{
|
{
|
||||||
FireSpeed = 0;
|
FireSpeed = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
CheckRSC();
|
CheckRSC();
|
||||||
if (i == (weaponitemone.Count - 1))
|
if (i == (weaponitemone.Count - 1))
|
||||||
{
|
{
|
||||||
StartCoroutine(WeaponitemoneDataAddition());
|
StartCoroutine(WeaponitemoneDataAddition());
|
||||||
}
|
}
|
||||||
|
SwitchWRJModel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 雷达检测无人机身上得RSC
|
/// 雷达检测无人机身上得RSC
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void CheckRSC()
|
public void CheckRSC()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(RCS))
|
||||||
{
|
{
|
||||||
float rcs = float.Parse(RCS);
|
float rcs = float.Parse(RCS);
|
||||||
if (rcs <= 0.5 && rcs >= 0.1)
|
if (rcs <= 0.5 && rcs >= 0.1)
|
||||||
|
@ -473,6 +494,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
StartCoroutine(ShowRadarTips(0.4f, 1));
|
StartCoroutine(ShowRadarTips(0.4f, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 多少时间在对方雷达界面上显示红色标记
|
/// 多少时间在对方雷达界面上显示红色标记
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -539,9 +561,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单个无人机数据写入
|
/// 单个无人机数据写入
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue