激光大修改
This commit is contained in:
parent
5f41effd6e
commit
2e62ccf66e
|
|
@ -23099,7 +23099,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalScale.x
|
propertyPath: m_LocalScale.x
|
||||||
value: 10
|
value: 15
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
@ -23109,7 +23109,7 @@ PrefabInstance:
|
||||||
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalScale.z
|
propertyPath: m_LocalScale.z
|
||||||
value: 10
|
value: 15
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
- target: {fileID: 8500934962979638684, guid: 91b685a7f0a6f7643b8ae61842f883de,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
|
|
||||||
|
|
@ -1907,7 +1907,7 @@ Camera:
|
||||||
far clip plane: 1000
|
far clip plane: 1000
|
||||||
field of view: 60
|
field of view: 60
|
||||||
orthographic: 0
|
orthographic: 0
|
||||||
orthographic size: 5
|
orthographic size: 10
|
||||||
m_Depth: 0
|
m_Depth: 0
|
||||||
m_CullingMask:
|
m_CullingMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
@ -10088,7 +10088,10 @@ MonoBehaviour:
|
||||||
CumulativeActionTimeOfDamageTarget: 1
|
CumulativeActionTimeOfDamageTarget: 1
|
||||||
InterferenceDistance: 1
|
InterferenceDistance: 1
|
||||||
InterferenceAngle: 1
|
InterferenceAngle: 1
|
||||||
|
Receivingdistance: 0
|
||||||
|
timepiece: 5
|
||||||
isLasing: 0
|
isLasing: 0
|
||||||
|
isLasings: 0
|
||||||
LaserModer: {fileID: 7615181138790815506}
|
LaserModer: {fileID: 7615181138790815506}
|
||||||
LaserPoint: {fileID: 7615181139587479128}
|
LaserPoint: {fileID: 7615181139587479128}
|
||||||
targetPoint: {fileID: 0}
|
targetPoint: {fileID: 0}
|
||||||
|
|
@ -10108,6 +10111,7 @@ MonoBehaviour:
|
||||||
Front: 1
|
Front: 1
|
||||||
Detection: {fileID: 3494968556799403172, guid: c20b9fea41a9bce4e8780bab3d0e13f9,
|
Detection: {fileID: 3494968556799403172, guid: c20b9fea41a9bce4e8780bab3d0e13f9,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
Receivingposin: {fileID: 0}
|
||||||
--- !u!114 &7615181139496386323
|
--- !u!114 &7615181139496386323
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ RectTransform:
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 420, y: 330}
|
m_SizeDelta: {x: 400, y: 400}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1586417954742020053
|
--- !u!222 &1586417954742020053
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
|
@ -108,7 +108,7 @@ RectTransform:
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 420, y: 330}
|
m_SizeDelta: {x: 400, y: 400}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1586417954866262514
|
--- !u!222 &1586417954866262514
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
|
@ -131,7 +131,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 0.14173195, g: 0.6132076, b: 0.15074104, a: 0.65882355}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 1
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
|
|
@ -171,6 +171,7 @@ GameObject:
|
||||||
- component: {fileID: 1586417955185665353}
|
- component: {fileID: 1586417955185665353}
|
||||||
- component: {fileID: 1586417955185665355}
|
- component: {fileID: 1586417955185665355}
|
||||||
- component: {fileID: 1586417955185665352}
|
- component: {fileID: 1586417955185665352}
|
||||||
|
- component: {fileID: 5625461230196841852}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Minimap
|
m_Name: Minimap
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -190,6 +191,7 @@ RectTransform:
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1586417954866262513}
|
- {fileID: 1586417954866262513}
|
||||||
|
- {fileID: 8295591216700450604}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|
@ -235,3 +237,168 @@ MonoBehaviour:
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!95 &5625461230196841852
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1586417955185665358}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 9100000, guid: 1bcafaff71ab94f44b5f493699d1f431, type: 2}
|
||||||
|
m_CullingMode: 0
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ApplyRootMotion: 0
|
||||||
|
m_LinearVelocityBlending: 0
|
||||||
|
m_WarningMessage:
|
||||||
|
m_HasTransformHierarchy: 1
|
||||||
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
|
m_KeepAnimatorControllerStateOnDisable: 0
|
||||||
|
--- !u!1001 &2854750051717222595
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 1586417955185665353}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 5792952501764384510, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Sprite
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: -5719797979667371551, guid: 21f18eeb9c7a8e34aa2c8ac5d1a572ce,
|
||||||
|
type: 3}
|
||||||
|
- target: {fileID: 5792952501764384510, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.r
|
||||||
|
value: 0.043878667
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5792952501764384510, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.g
|
||||||
|
value: 0.9716981
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5792952501764384510, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Color.b
|
||||||
|
value: 0.03208439
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 390
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 390
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Pivot.x
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Pivot.y
|
||||||
|
value: 0.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6612989792782812400, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: "\u626B\u63CF\u533A\u57DF"
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 27b14bebf99279747a2a4c8e57fd66a7, type: 3}
|
||||||
|
--- !u!224 &8295591216700450604 stripped
|
||||||
|
RectTransform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 6089359614475106287, guid: 27b14bebf99279747a2a4c8e57fd66a7,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2854750051717222595}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
|
|
||||||
|
|
@ -1149,7 +1149,7 @@ public class Scenariopage : MonoBehaviour
|
||||||
aircraft.think_device_id = strlist[3];
|
aircraft.think_device_id = strlist[3];
|
||||||
aircraft.para_name = laserlist[i].text;
|
aircraft.para_name = laserlist[i].text;
|
||||||
//aircraft.para_type = "";
|
//aircraft.para_type = "";
|
||||||
aircraft.para_value = laserquantitylist[i].value.ToString("0");
|
aircraft.para_value = laserquantitylist[i].value.ToString("f1");
|
||||||
aircraft.para_unit = laserunitlists[i];
|
aircraft.para_unit = laserunitlists[i];
|
||||||
aircraft.r1 = Laserunitlist[i].text;
|
aircraft.r1 = Laserunitlist[i].text;
|
||||||
//aircraft.r2 = "";
|
//aircraft.r2 = "";
|
||||||
|
|
@ -2189,7 +2189,7 @@ public class Scenariopage : MonoBehaviour
|
||||||
{
|
{
|
||||||
Aircraft aircraft = new Aircraft();
|
Aircraft aircraft = new Aircraft();
|
||||||
aircraft.para_name = laserlist[i].text;
|
aircraft.para_name = laserlist[i].text;
|
||||||
aircraft.para_value = laserquantitylist[i].value.ToString("0");
|
aircraft.para_value = laserquantitylist[i].value.ToString("f1");
|
||||||
aircraft.para_unit = laserunitlists[i];
|
aircraft.para_unit = laserunitlists[i];
|
||||||
aircraft.r1 = Laserunitlist[i].text;
|
aircraft.r1 = Laserunitlist[i].text;
|
||||||
aircrafts.Add(aircraft);
|
aircrafts.Add(aircraft);
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 0}
|
m_Sun: {fileID: 0}
|
||||||
m_IndirectSpecularColor: {r: 0.165218, g: 0.3075422, b: 0.6572481, a: 1}
|
m_IndirectSpecularColor: {r: 0.16521391, g: 0.30764452, b: 0.6578343, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
|
@ -95782,6 +95782,21 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: angle1_text
|
value: angle1_text
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4723123646946089641, guid: 2ac9048583d0af747848ea5faaf1843a,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_MinValue
|
||||||
|
value: 0.1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4723123646946089641, guid: 2ac9048583d0af747848ea5faaf1843a,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_WholeNumbers
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4723123646946089641, guid: 2ac9048583d0af747848ea5faaf1843a,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Value
|
||||||
|
value: 0.039
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4723123647038005820, guid: 2ac9048583d0af747848ea5faaf1843a,
|
- target: {fileID: 4723123647038005820, guid: 2ac9048583d0af747848ea5faaf1843a,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
|
|
@ -106459,7 +106474,7 @@ MonoBehaviour:
|
||||||
m_PreInfinity: 2
|
m_PreInfinity: 2
|
||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
randSeed: 1860173453
|
randSeed: -2003133703
|
||||||
isDoingTransition: 0
|
isDoingTransition: 0
|
||||||
minimumHeight: 0
|
minimumHeight: 0
|
||||||
--- !u!114 &1820978574
|
--- !u!114 &1820978574
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ using Newtonsoft.Json.Linq;
|
||||||
public static class InterfaceManager
|
public static class InterfaceManager
|
||||||
{
|
{
|
||||||
|
|
||||||
private static string _IP = "172.16.1.41";
|
private static string _IP = "172.16.1.128";
|
||||||
public static string IP
|
public static string IP
|
||||||
{
|
{
|
||||||
get { return _IP; }
|
get { return _IP; }
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public class EquipmentCommon : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameObject explodePrefab;
|
public GameObject explodePrefab;
|
||||||
|
|
||||||
void Start()
|
void Awake()
|
||||||
{
|
{
|
||||||
equipmentCommon = GetComponent<EquipmentCommon>();
|
equipmentCommon = GetComponent<EquipmentCommon>();
|
||||||
DeviceManager.Instance.devices.Add(this);
|
DeviceManager.Instance.devices.Add(this);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ using Newtonsoft.Json;
|
||||||
using static InterfaceManager;
|
using static InterfaceManager;
|
||||||
using DG.Tweening.Core.Easing;
|
using DG.Tweening.Core.Easing;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
|
using System;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 激光火控平台
|
/// 激光火控平台
|
||||||
|
|
@ -43,6 +44,14 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 协程对象
|
/// 协程对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
private Coroutine coroutinetime;
|
||||||
|
/// <summary>
|
||||||
|
/// 定时器运行状态
|
||||||
|
/// </summary>
|
||||||
|
private bool islaser = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 协程对象
|
||||||
|
/// </summary>
|
||||||
private Coroutine timerCoroutine;
|
private Coroutine timerCoroutine;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 定时器运行状态
|
/// 定时器运行状态
|
||||||
|
|
@ -72,14 +81,24 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// 干扰角度
|
/// 干扰角度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string InterferenceAngle;
|
public string InterferenceAngle;
|
||||||
|
/// <summary>
|
||||||
|
/// 接收干扰距离
|
||||||
|
/// </summary>
|
||||||
|
public float Receivingdistance;
|
||||||
|
/// <summary>
|
||||||
|
/// 计时器
|
||||||
|
/// </summary>
|
||||||
|
public float timepiece = 5;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 激光
|
#region 激光
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否这在攻击无人机
|
/// 是否这在攻击无人机
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool isLasing = false;
|
public bool isLasing = false;//判断看向无人机
|
||||||
|
public bool isLasings = false;//判断时候需要攻击
|
||||||
public GameObject LaserModer;
|
public GameObject LaserModer;
|
||||||
public GameObject LaserPoint;
|
public GameObject LaserPoint;
|
||||||
public Transform targetPoint; // 锁定目标点的Transform组件
|
public Transform targetPoint; // 锁定目标点的Transform组件
|
||||||
|
|
@ -111,16 +130,20 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示十字准星开关
|
/// 显示十字准星开关
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Front=true;
|
public bool Front = true;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 点击空白处碰撞器
|
/// 点击空白处碰撞器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameObject Detection;
|
public GameObject Detection;
|
||||||
|
/// <summary>
|
||||||
|
/// 接收检测到的无人机位置
|
||||||
|
/// </summary>
|
||||||
|
public Transform Receivingposin;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
equipmentCommon = GetComponent<EquipmentCommon>();
|
equipmentCommon = GetComponent<EquipmentCommon>();
|
||||||
laserFireControlPlatformMangers.Add(this);
|
laserFireControlPlatformMangers.Add(this);
|
||||||
Camera =transform.GetChild(1).GetComponent<Camera>();
|
Camera = transform.GetChild(1).GetComponent<Camera>();
|
||||||
//weaponitemones = Newtonsoft.Json.JsonConvert.DeserializeObject<Weaponitemone>(msg);
|
//weaponitemones = Newtonsoft.Json.JsonConvert.DeserializeObject<Weaponitemone>(msg);
|
||||||
//FillInTheData(weaponitemones);//测试写入
|
//FillInTheData(weaponitemones);//测试写入
|
||||||
// 订阅布尔值变化事件
|
// 订阅布尔值变化事件
|
||||||
|
|
@ -135,6 +158,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
InnerLaserlineRenderer.positionCount = 2; // 设置线段的端点数量为2
|
InnerLaserlineRenderer.positionCount = 2; // 设置线段的端点数量为2
|
||||||
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
InnerLaserlineRenderer.SetPosition(1, LaserPoint.transform.position); // 设置线段终点为目标点
|
InnerLaserlineRenderer.SetPosition(1, LaserPoint.transform.position); // 设置线段终点为目标点
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -161,24 +185,75 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
Front = true;
|
Front = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 导条变化调用
|
/// 开启暂停激光发射武器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="newValue"></param>
|
void OnActivationChangedHandler(bool bos)
|
||||||
void OnActivationChangedHandler(bool newValue)
|
|
||||||
{
|
{
|
||||||
if (newValue)
|
if (bos)
|
||||||
{
|
{
|
||||||
Debug.Log("导条开启时调用");
|
Debug.LogError("开启协程");
|
||||||
|
starttimer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("导条暂停时调用");
|
Debug.LogError("暂停协程");
|
||||||
|
stoptimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开启协程
|
||||||
|
/// </summary>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
private void starttimer()
|
||||||
|
{
|
||||||
|
if (equipmentCommon.isPlayer && coroutinetime == null)
|
||||||
|
{
|
||||||
|
coroutinetime = StartCoroutine(Timer());
|
||||||
|
islaser = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 关闭协程
|
||||||
|
/// </summary>
|
||||||
|
private void stoptimer()
|
||||||
|
{
|
||||||
|
if (equipmentCommon.isPlayer && coroutinetime != null)
|
||||||
|
{
|
||||||
|
StopCoroutine(coroutinetime);
|
||||||
|
islaser = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 协程
|
||||||
|
/// </summary>
|
||||||
|
IEnumerator Timer()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(timepiece);
|
||||||
|
if (timepiece!=0)
|
||||||
|
{
|
||||||
|
Laserattack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
////激光发射的方法
|
||||||
|
//Laserattack();
|
||||||
|
if (isLasings == true)
|
||||||
|
{
|
||||||
|
CastRayAndRender();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 创建场景激光发射
|
#region 创建场景激光发射
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -193,12 +268,16 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
{
|
{
|
||||||
case "储能间隔时间:":
|
case "储能间隔时间:":
|
||||||
StorageIntervalTime = weaponitemone[i].para_value;
|
StorageIntervalTime = weaponitemone[i].para_value;
|
||||||
|
Debug.LogError("打击间隔时间:" + StorageIntervalTime);
|
||||||
|
//timepiece = float.Parse(StorageIntervalTime);
|
||||||
break;
|
break;
|
||||||
case "毁伤目标累积作用时间:":
|
case "毁伤目标累积作用时间:":
|
||||||
CumulativeActionTimeOfDamageTarget = weaponitemone[i].para_value;
|
CumulativeActionTimeOfDamageTarget = weaponitemone[i].para_value;
|
||||||
break;
|
break;
|
||||||
case "干扰距离:":
|
case "干扰距离:":
|
||||||
InterferenceDistance = weaponitemone[i].para_value;
|
InterferenceDistance = weaponitemone[i].para_value;
|
||||||
|
Debug.LogError(InterferenceDistance);
|
||||||
|
Receivingdistance = float.Parse(InterferenceDistance) * 1000;
|
||||||
break;
|
break;
|
||||||
case "干扰角度:":
|
case "干扰角度:":
|
||||||
InterferenceAngle = weaponitemone[i].para_value;
|
InterferenceAngle = weaponitemone[i].para_value;
|
||||||
|
|
@ -210,18 +289,57 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发射激光
|
/// 激光发起攻击
|
||||||
|
/// </summary>
|
||||||
|
public void Laserattack()
|
||||||
|
{
|
||||||
|
if (Receivingdistance > 0)
|
||||||
|
{
|
||||||
|
Collider[] colliders = Physics.OverlapSphere(transform.position, Receivingdistance);//检查是否在打击的范围内
|
||||||
|
Debug.LogError("范围打击距离:" + Receivingdistance);
|
||||||
|
for (int i = 0; i < colliders.Length; i++)
|
||||||
|
{
|
||||||
|
if (colliders[i].gameObject.tag == "WRJ")
|
||||||
|
{
|
||||||
|
UnmannedAerialVehicle unmannedAerialVehicle = null;
|
||||||
|
if (colliders[i].GetComponent<UnmannedAerialVehicle>())
|
||||||
|
{
|
||||||
|
unmannedAerialVehicle = colliders[i].GetComponent<UnmannedAerialVehicle>();
|
||||||
|
}
|
||||||
|
if (unmannedAerialVehicle != null)
|
||||||
|
{
|
||||||
|
Vector3 Angle = unmannedAerialVehicle.transform.position - transform.position;
|
||||||
|
float Angle1 = Vector3.Angle(Angle, transform.forward);
|
||||||
|
Debug.LogError("角度大小:" + Angle1);
|
||||||
|
if (float.Parse(InterferenceAngle) >= Angle1)
|
||||||
|
{
|
||||||
|
Debug.LogError("角度没有问题进来了" + InterferenceAngle);
|
||||||
|
Debug.Log("计时器的时间:" + timepiece);
|
||||||
|
Receivingposin = unmannedAerialVehicle.transform;
|
||||||
|
isLasings = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 看向无人机
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Lasing()
|
public void Lasing()
|
||||||
{
|
{
|
||||||
if (targetPoint != null)
|
if (targetPoint != null)
|
||||||
{
|
{
|
||||||
LaserModer.transform.DOLookAt(targetPoint.position, 0.5f).OnComplete(()=> {
|
LaserModer.transform.DOLookAt(targetPoint.position, 0.1f).OnComplete(() =>
|
||||||
Debug.Log("目标点位..:"+targetPoint.position);
|
{
|
||||||
CastRayAndRender();
|
Debug.Log("目标点位..:" + targetPoint.position);
|
||||||
|
isLasing = false;
|
||||||
|
//CastRayAndRender();
|
||||||
});
|
});
|
||||||
var nowData = GetSyncData();
|
//var nowData = GetSyncData();
|
||||||
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
//_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -233,32 +351,32 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Crosshair()
|
public void Crosshair()
|
||||||
{
|
{
|
||||||
if (targetPoint !=null)
|
if (targetPoint != null)
|
||||||
{
|
{
|
||||||
Camera.transform.DOLookAt(targetPoint.position,0.5f).SetEase(Ease.Linear);
|
Camera.transform.DOLookAt(targetPoint.position, 0.1f).SetEase(Ease.Linear);
|
||||||
|
isLasing = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Log("没有目标出现");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 激光显示
|
/// 激光显示
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void CastRayAndRender()
|
public void CastRayAndRender()
|
||||||
{
|
{
|
||||||
|
var nowData = GetSyncData();
|
||||||
|
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
|
||||||
if (InnerLaserlineRenderer)
|
if (InnerLaserlineRenderer)
|
||||||
{
|
{
|
||||||
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
InnerLaserlineRenderer.SetPosition(1, targetPoint.position); // 设置线段终点为目标点
|
InnerLaserlineRenderer.SetPosition(1, Receivingposin.position); // 设置线段终点为目标点
|
||||||
}
|
}
|
||||||
if (OuterLaserlineRenderer)
|
if (OuterLaserlineRenderer)
|
||||||
{
|
{
|
||||||
OuterLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
OuterLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
OuterLaserlineRenderer.SetPosition(1, targetPoint.position); // 设置线段终点为目标点
|
OuterLaserlineRenderer.SetPosition(1, Receivingposin.position); // 设置线段终点为目标点
|
||||||
}
|
}
|
||||||
StrikeDrone(targetPoint.transform);
|
StrikeDrone(Receivingposin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -274,6 +392,46 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
StartCoroutine(LaserExtinction());
|
StartCoroutine(LaserExtinction());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 激光打击位置未打中
|
||||||
|
/// </summary>
|
||||||
|
public void Lasering()
|
||||||
|
{
|
||||||
|
if (targetPoint != null)
|
||||||
|
{
|
||||||
|
targetPoint.position = new Vector3(targetPoint.position.x + 5, targetPoint.position.y, transform.position.z);
|
||||||
|
LaserModer.transform.DOLookAt(targetPoint.position, 0.5f);
|
||||||
|
CastRayAndRender1();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 十字准星架为打中视角
|
||||||
|
/// </summary>
|
||||||
|
public void Crosshair1()
|
||||||
|
{
|
||||||
|
if (targetPoint != null)
|
||||||
|
{
|
||||||
|
targetPoint.position = new Vector3(targetPoint.position.x + 5, targetPoint.position.y, transform.position.z);
|
||||||
|
Camera.transform.DOLookAt(targetPoint.position, 0.1f).SetEase(Ease.Linear);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 激光显示为打中
|
||||||
|
/// </summary>
|
||||||
|
public void CastRayAndRender1()
|
||||||
|
{
|
||||||
|
if (InnerLaserlineRenderer)
|
||||||
|
{
|
||||||
|
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
|
InnerLaserlineRenderer.SetPosition(1, targetPoint.position); // 设置线段终点为目标点
|
||||||
|
}
|
||||||
|
if (OuterLaserlineRenderer)
|
||||||
|
{
|
||||||
|
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
|
InnerLaserlineRenderer.SetPosition(1, targetPoint.position); // 设置线段终点为目标点
|
||||||
|
}
|
||||||
|
StartCoroutine(LaserExtinction());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 销毁单体无人机
|
/// 销毁单体无人机
|
||||||
|
|
@ -312,7 +470,8 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
WWWForm wWWForm = new WWWForm();
|
WWWForm wWWForm = new WWWForm();
|
||||||
wWWForm.AddField("data", uploadLogMainJson);
|
wWWForm.AddField("data", uploadLogMainJson);
|
||||||
Debug.Log(uploadLogMainJson);
|
Debug.Log(uploadLogMainJson);
|
||||||
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data => {
|
StartCoroutine(PostString(Url_Addpracticelog, wWWForm, data =>
|
||||||
|
{
|
||||||
Debug.Log(data);
|
Debug.Log(data);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
@ -343,7 +502,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
OuterLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
OuterLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
OuterLaserlineRenderer.SetPosition(1, LaserPoint.transform.position); // 设置线段终点为目标点
|
OuterLaserlineRenderer.SetPosition(1, LaserPoint.transform.position); // 设置线段终点为目标点
|
||||||
}
|
}
|
||||||
isLasing = false;
|
isLasings = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -355,8 +514,8 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected string GetSyncData()
|
protected string GetSyncData()
|
||||||
{
|
{
|
||||||
Debug.Log("目标点位..:" + targetPoint.position);
|
Debug.Log("目标点位..:" + Receivingposin.position);
|
||||||
return string.Format("{0},{1},{2},{3},{4}", "Lasing", equipmentCommon.deviceID, targetPoint.position.x, targetPoint.position.y, targetPoint.position.z);
|
return string.Format("{0},{1},{2},{3},{4}", "Lasing", equipmentCommon.deviceID, Receivingposin.position.x, Receivingposin.position.y, Receivingposin.position.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -366,10 +525,11 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
public void NonSelfGeneratedEmissionLaser(string[] data)
|
public void NonSelfGeneratedEmissionLaser(string[] data)
|
||||||
{
|
{
|
||||||
Vector3 vector3 = new Vector3(float.Parse(data[2]), float.Parse(data[3]), float.Parse(data[4]));
|
Vector3 vector3 = new Vector3(float.Parse(data[2]), float.Parse(data[3]), float.Parse(data[4]));
|
||||||
LaserModer.transform.DOLookAt(vector3, 0.1f).OnComplete(() => {
|
LaserModer.transform.DOLookAt(vector3, 0.1f).OnComplete(() =>
|
||||||
|
{
|
||||||
if (InnerLaserlineRenderer)
|
if (InnerLaserlineRenderer)
|
||||||
{
|
{
|
||||||
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
InnerLaserlineRenderer.SetPosition(0, LaserPoint.transform.position); // 设置线段起点为物体位置
|
||||||
InnerLaserlineRenderer.SetPosition(1, vector3); // 设置线段终点为目标点
|
InnerLaserlineRenderer.SetPosition(1, vector3); // 设置线段终点为目标点
|
||||||
}
|
}
|
||||||
if (OuterLaserlineRenderer)
|
if (OuterLaserlineRenderer)
|
||||||
|
|
@ -385,7 +545,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void OnMouseEnter()
|
public void OnMouseEnter()
|
||||||
{
|
{
|
||||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId)!="0")
|
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) != "0")
|
||||||
{
|
{
|
||||||
Transform Canvas = GameObject.Find("Canvas").transform;
|
Transform Canvas = GameObject.Find("Canvas").transform;
|
||||||
if (Canvas && Front)
|
if (Canvas && Front)
|
||||||
|
|
@ -400,7 +560,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void OnMouseExit()
|
public void OnMouseExit()
|
||||||
{
|
{
|
||||||
Front =false;
|
Front = false;
|
||||||
}
|
}
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ public class RadarManger : MonoBehaviour
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
RetrievalUAV();//看向无人机
|
||||||
}
|
}
|
||||||
#region 启动暂停
|
#region 启动暂停
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -164,7 +164,7 @@ public class RadarManger : MonoBehaviour
|
||||||
{
|
{
|
||||||
//Debug.Log("Timer fired at: " + Time.time);
|
//Debug.Log("Timer fired at: " + Time.time);
|
||||||
yield return new WaitForSeconds(interval); // 等待一段时间后继续执行
|
yield return new WaitForSeconds(interval); // 等待一段时间后继续执行
|
||||||
RetrievalUAV();
|
//RetrievalUAV();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -175,11 +175,11 @@ public class RadarManger : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (equipmentCommon.isPlayer && timerCoroutine == null)
|
if (equipmentCommon.isPlayer && timerCoroutine == null)
|
||||||
{
|
{
|
||||||
timerCoroutine = StartCoroutine(Timer());
|
//timerCoroutine = StartCoroutine(Timer());
|
||||||
isTimerRunning = true;
|
isTimerRunning = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>s
|
||||||
/// 停止
|
/// 停止
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void StopTimer()
|
public void StopTimer()
|
||||||
|
|
@ -294,28 +294,25 @@ public class RadarManger : MonoBehaviour
|
||||||
Mincamera.orthographicSize = detectionRadius;
|
Mincamera.orthographicSize = detectionRadius;
|
||||||
if (colliders2.Count > 0)
|
if (colliders2.Count > 0)
|
||||||
{
|
{
|
||||||
if (Random.value > (1 - float.Parse(DetectionSuccessRate) / 100))
|
for (int i = 0; i < colliders2.Count; i++)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < colliders2.Count; i++)
|
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
||||||
|
if (unmannedAerialVehicle)
|
||||||
{
|
{
|
||||||
UnmannedAerialVehicle unmannedAerialVehicle = colliders2[i].GetComponent<UnmannedAerialVehicle>();
|
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
||||||
if (unmannedAerialVehicle)
|
if (laserFireControlPlatformManger)
|
||||||
{
|
{
|
||||||
LaserFireControlPlatformManger laserFireControlPlatformManger = LaserFireControlPlatformManger.laserFireControlPlatformMangers.Find(x => (x != null && x.isLasing == false));
|
laserFireControlPlatformManger.isLasing=true;
|
||||||
if (laserFireControlPlatformManger)
|
//Debug.Log(laserFireControlPlatformManger.transform.name + "攻击无人机: " + unmannedAerialVehicle.transform.name);
|
||||||
{
|
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
||||||
laserFireControlPlatformManger.isLasing = true;
|
laserFireControlPlatformManger.Crosshair();
|
||||||
Debug.Log(laserFireControlPlatformManger.transform.name + "攻击无人机: " + unmannedAerialVehicle.transform.name);
|
laserFireControlPlatformManger.Lasing();
|
||||||
laserFireControlPlatformManger.targetPoint = unmannedAerialVehicle.transform;
|
|
||||||
laserFireControlPlatformManger.Crosshair();
|
|
||||||
laserFireControlPlatformManger.Lasing();
|
|
||||||
}
|
|
||||||
number++;
|
|
||||||
}
|
}
|
||||||
}
|
number++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue