This commit is contained in:
yulong 2024-01-21 13:17:56 +08:00
commit 5175e57e85
12 changed files with 858 additions and 104 deletions

View File

@ -155,6 +155,7 @@ GameObject:
- component: {fileID: 1868832763}
- component: {fileID: 1868832762}
- component: {fileID: 1868832761}
- component: {fileID: 3248651062214198486}
m_Layer: 11
m_Name: Sphere
m_TagString: Untagged
@ -231,11 +232,27 @@ SphereCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1868832759}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!54 &3248651062214198486
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1868832759}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &34767209977200763
GameObject:
m_ObjectHideFlags: 0
@ -590,7 +607,7 @@ MonoBehaviour:
airRoute: {fileID: 0}
endPosition: {x: 0, y: 0, z: 0}
FireSpeed: 20
detectionRadius: 50
detectionRadius: 600
isEngagedTarget: 0
gxWRJCamera: {fileID: 6382256847466738257}
batteryLife: 1
@ -601,8 +618,8 @@ MonoBehaviour:
dataLinkCommunicationFrequency: 1
electronicReconnaissanceCapability: 1
opticalReconnaissanceCapability: 1
allColliders: []
attackColliders1: []
currentCollider: {fileID: 0}
--- !u!1 &7326748669528570608
GameObject:
m_ObjectHideFlags: 0
@ -1536,12 +1553,6 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &8062921474742261735 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 87581316664468991}
m_PrefabAsset: {fileID: 0}
--- !u!114 &2044690712093867138 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -1554,6 +1565,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &8062921474742261735 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 87581316664468991}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &715777664892440568
PrefabInstance:
m_ObjectHideFlags: 0
@ -3290,6 +3307,12 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &7258120122570228599 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 749958366770983279}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1675188196275480594 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -3302,12 +3325,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &7258120122570228599 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 749958366770983279}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1268904682848828821
PrefabInstance:
m_ObjectHideFlags: 0
@ -4167,6 +4184,12 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &9173384892180205453 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 1268904682848828821}
m_PrefabAsset: {fileID: 0}
--- !u!114 &921861295564825832 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -4179,12 +4202,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &9173384892180205453 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 1268904682848828821}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1468629587382336293
PrefabInstance:
m_ObjectHideFlags: 0
@ -5921,6 +5938,12 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &8798000438643106319 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 1498185928744833047}
m_PrefabAsset: {fileID: 0}
--- !u!114 &692909800614857066 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -5933,12 +5956,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &8798000438643106319 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 1498185928744833047}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1752211167157593052
PrefabInstance:
m_ObjectHideFlags: 0
@ -10306,12 +10323,6 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &8153123965611774344 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 2303540555920778128}
m_PrefabAsset: {fileID: 0}
--- !u!114 &189366751241648877 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -10324,6 +10335,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &8153123965611774344 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 2303540555920778128}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2498570764477447715
PrefabInstance:
m_ObjectHideFlags: 0
@ -10546,6 +10563,16 @@ PrefabInstance:
propertyPath: shell
value:
objectReference: {fileID: 1868832759}
- target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
propertyPath: bulletPrefab
value:
objectReference: {fileID: 1868832759}
- target: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
propertyPath: bulletPoint
value:
objectReference: {fileID: 1868832760}
- target: {fileID: 2254950790765467284, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
propertyPath: m_Layer
@ -11193,12 +11220,6 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &5512074156260461627 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 2498570764477447715}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4610455937839310686 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -11211,6 +11232,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &5512074156260461627 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 2498570764477447715}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2809197756700194186
PrefabInstance:
m_ObjectHideFlags: 0
@ -13824,6 +13851,12 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &4944900371505117884 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 3048292988923725988}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3970666008213377497 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -13836,12 +13869,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &4944900371505117884 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 3048292988923725988}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3662279832116246199
PrefabInstance:
m_ObjectHideFlags: 0
@ -14701,12 +14728,6 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 088baeb890d17754287a1161c0b1dceb, type: 3}
--- !u!4 &6629702139642053807 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 3662279832116246199}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3423894577495912394 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2114182605201611133, guid: 088baeb890d17754287a1161c0b1dceb,
@ -14719,6 +14740,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d11073938bcdd54589608b4b411b889, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &6629702139642053807 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7985558213978141208, guid: 088baeb890d17754287a1161c0b1dceb,
type: 3}
m_PrefabInstance: {fileID: 3662279832116246199}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4110930979306373867
PrefabInstance:
m_ObjectHideFlags: 0
@ -23496,6 +23523,16 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 6865737300552731159}
m_Modifications:
- target: {fileID: 302957159522640772, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3}
propertyPath: m_CastShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 302957159522640772, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3}
propertyPath: m_ReceiveShadows
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5698306997877693391, guid: 91b685a7f0a6f7643b8ae61842f883de,
type: 3}
propertyPath: m_LocalPosition.x

View File

@ -211,7 +211,7 @@ public class Microwaveweapon : MonoBehaviour
{
if (miceopos!=null)
{
microblog.MicrowaveDisplay(micdistance / 10);
microblog.MicrowaveDisplay(micdistance);
Closeattack(miceopos);
}
}
@ -270,7 +270,7 @@ public class Microwaveweapon : MonoBehaviour
//接收激光下发的位置
Vector3 vector =new Vector3(float.Parse(data[2]), float.Parse(data[3]),float.Parse(data[4]));
microwavemoder.transform.DOLookAt(vector, 0.1f).SetEase(Ease.Linear).OnComplete(() => {
microblog.MicrowaveDisplay(micdistance / 10);
microblog.MicrowaveDisplay(micdistance);
StartCoroutine(Offlaserstrike());
});

View File

@ -0,0 +1,628 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &161155940
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 161155942}
- component: {fileID: 161155941}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &161155941
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 161155940}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &161155942
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 161155940}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &348123941
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 348123942}
- component: {fileID: 348123946}
- component: {fileID: 348123945}
- component: {fileID: 348123944}
- component: {fileID: 348123943}
- component: {fileID: 348123947}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &348123942
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 348123941}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 703651079}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &348123943
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 348123941}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1366ebb42de7fb845b8556985dc495b0, type: 3}
m_Name:
m_EditorClassIdentifier:
onShellAttack:
m_PersistentCalls:
m_Calls: []
isPlayer: 0
--- !u!135 &348123944
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 348123941}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &348123945
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 348123941}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &348123946
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 348123941}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!54 &348123947
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 348123941}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &463062832
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 463062835}
- component: {fileID: 463062834}
- component: {fileID: 463062833}
- component: {fileID: 463062836}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &463062833
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 463062832}
m_Enabled: 1
--- !u!20 &463062834
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 463062832}
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: -1
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!4 &463062835
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 463062832}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &463062836
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 463062832}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b016422445d4f09468697e65f1bf86f4, type: 3}
m_Name:
m_EditorClassIdentifier:
bulletPrefab: {fileID: 348123941}
firePoint: {fileID: 348123942}
bulletForce: 20
--- !u!1 &703651075
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 703651079}
- component: {fileID: 703651078}
- component: {fileID: 703651077}
- component: {fileID: 703651076}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &703651076
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 703651075}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &703651077
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 703651075}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &703651078
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 703651075}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &703651079
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 703651075}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -476.33, y: 86.10121, z: -47.14}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 348123942}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1638892544
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1638892548}
- component: {fileID: 1638892547}
- component: {fileID: 1638892546}
- component: {fileID: 1638892545}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &1638892545
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638892544}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1638892546
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638892544}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1638892547
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638892544}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1638892548
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638892544}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -464.54, y: 86.10121, z: -40.62}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: abac5c75975a7a5439c94336c6a75895
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,14 +5,14 @@ using UnityEngine.Events;
public class ShellBoom : MonoBehaviour
{
public UnityEvent onShellAttack;
public UnityEvent onShellAttack = new UnityEvent();
public bool isPlayer = false;
private void OnTriggerEnter(Collider other)
{
Debug.Log(other.gameObject.name);
if (isPlayer && other.tag == "AttackTarget")
{
onShellAttack?.Invoke();
}
}
}

View File

@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TestTTT : MonoBehaviour
{
public GameObject bulletPrefab; // 子弹预制体
public Transform firePoint; // 发射点
public float bulletForce = 20f; // 子弹速度
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown("w"))
{
GameObject bullet = Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);
bullet.SetActive(true);
Rigidbody rb = bullet.GetComponent<Rigidbody>();
rb.AddForce(firePoint.forward * bulletForce, ForceMode.Impulse);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b016422445d4f09468697e65f1bf86f4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -116,24 +116,32 @@ public class DeviceManager : MonoSingleton<DeviceManager>
return tempUAM;
}
public void SetCollider4WRJ(List<Collider> attackColliders)
public void SetCollider4WRJ(List<Collider> attackColliders, ref Collider currentTarget)
{
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[0] != null && temp[i].unmannedAerialVehicles[0].gameObject.activeSelf)
{
if (temp[i].unmannedAerialVehicles[j] != null && temp[i].unmannedAerialVehicles[j].gameObject.activeSelf)
if (temp[i].unmannedAerialVehicles[0].attackTarget == null)
{
if (temp[i].unmannedAerialVehicles[j].attackTarget == null)
for (int j = 0; j < attackColliders.Count; j++)
{
temp[i].unmannedAerialVehicles[j].AttAck(attackColliders[i].transform);
Collider c = null;
if (attackColliders[i] != null)
{
c = attackColliders[i];
}
if (attackColliders[j] != null)
{
temp[i].unmannedAerialVehicles[0].AttAck(attackColliders[j].transform);
}
}
}
}
}
}
}
@ -154,6 +162,15 @@ public class DeviceManager : MonoSingleton<DeviceManager>
{
equipmentCommon.GetComponent<TerrestrialRadioInterferenceManger>().InterferingFrequency = info[2];
}
else if (info[0] == "KeyTarget")
{
HighPriorityTarget highPriorityTarget= HighPriorityTarget.HighPriorityTargets.Find(x => x.Number == info[1]);
if(highPriorityTarget)
{
Vector3 Pos=new Vector3(float.Parse(info[3]), float.Parse(info[4]), float.Parse(info[5]));
highPriorityTarget.BeAssaulted(Pos, false);
}
}
else
{
if (equipmentCommon)

View File

@ -35,6 +35,7 @@ namespace Assets.Zion.Scripts.Adam
wRJControllers.Add(currentWRJ);
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);
}
}

View File

@ -1,5 +1,4 @@
using DG.Tweening;
using System.Collections;
using AdamSync;
using System.Collections.Generic;
using UnityEngine;
@ -16,8 +15,10 @@ public class HighPriorityTarget : MonoBehaviour
/// 重点设备完整度
/// </summary>
public static float EquipmentIntegrity = 1;
/// <summary>
/// 编号
/// </summary>
public string Number;
#region
/// <summary>
/// 单体保护目标属性血量
@ -59,18 +60,37 @@ public class HighPriorityTarget : MonoBehaviour
/// <summary>
/// 被攻击
/// </summary>
public void BeAssaulted(Vector3 Pos)
/// <param name="Pos">被攻击时触发点位置</param>
/// <param name="isSend">是否向外发送同步消息</param>
public void BeAssaulted(Vector3 Pos, bool isSend, int hp = 0)
{
HP -= 10;
GameObject Bao = Instantiate(explodePrefab, transform);
Bao.transform.localPosition = Pos;
Bao.transform.SetParent(null);
Bao.SetActive(true);
if (isSend)
{
HP -= 10;
GameObject Bao = Instantiate(explodePrefab, transform);
Bao.transform.localPosition = Pos;
Bao.transform.SetParent(null);
Bao.SetActive(true);
string nowData = GetSyncDis(Pos);
Debug.Log(nowData);
_ = SyncCreateRoom.SendMessageAsync(string.Format("send2room {0}", nowData));
}
else
{
HP = hp;
}
if (HP < 50)
{
ModerFull.SetActive(false);
ModerDamage.SetActive(true);
}
}
protected string GetSyncDis(Vector3 pos)
{
return string.Format("{0},{1},{2},{3},{4},{5}", "KeyTarget", Number, HP, pos.x, pos.y, pos.z);
}
}

View File

@ -78,7 +78,9 @@ public class UnmannedAerialVehicle : MonoBehaviour
/// <summary>
/// 炮弹
/// </summary>
public GameObject shell;
public GameObject bulletPrefab;
public Transform bulletPoint;
private void OnTriggerEnter(Collider other)
{
@ -207,8 +209,9 @@ public class UnmannedAerialVehicle : MonoBehaviour
{
if (wrjModel == WRJModel.)
{
StopCoroutine(RangedAttack());
StartCoroutine(RangedAttack());
Debug.Log("光学无人机攻击");
//StopCoroutine(RangedAttack());
//StartCoroutine(RangedAttack());
}
else
{
@ -232,9 +235,11 @@ public class UnmannedAerialVehicle : MonoBehaviour
{
while (attackTarget)
{
yield return new WaitForSeconds(1f);
GameObject obj = Instantiate(shell);
yield return new WaitForSeconds(0.5f);
GameObject obj = Instantiate(bulletPrefab, bulletPoint.position, bulletPoint.rotation);
obj.SetActive(true);
Rigidbody rb = obj.GetComponent<Rigidbody>();
rb.AddForce(bulletPoint.forward * 20f, ForceMode.Impulse);
ShellBoom sb = obj.AddComponent<ShellBoom>();
sb.isPlayer = unmannedAerialVehicleManage.equipmentCommon.isPlayer;
sb.onShellAttack.AddListener(() =>
@ -242,12 +247,8 @@ public class UnmannedAerialVehicle : MonoBehaviour
AddBao(attackTarget.transform);
// 销毁objectToDestroy对象
BeAssaulted("攻击到目标");
Destroy(sb);
});
Vector3 direction = obj.transform.position - attackTarget.position;
float step = 1 * Time.deltaTime;
obj.transform.rotation = Quaternion.LookRotation(direction);
obj.transform.position = Vector3.MoveTowards(obj.transform.position, attackTarget.position, step);
}
}

View File

@ -94,7 +94,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
/// <summary>
/// 检测范围半径
/// </summary>
public float detectionRadius = 80; //
public float detectionRadius = 500; //
/// <summary>
/// 是否正在攻击目标
/// </summary>
@ -269,7 +269,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
}
}
public List<Collider> allColliders = new List<Collider>();
public List<Collider> attackColliders1 = new List<Collider>();
@ -281,40 +280,44 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
//if (isEngagedTarget) return;
if (wrjModel == WRJModel. || wrjModel == WRJModel.)
{
allColliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
attackColliders1 = new List<Collider>();
List<Collider> allColliders = Physics.OverlapSphere(transform.position, detectionRadius).ToList(); // 检索范围内的所有碰撞体
for (int i = 0; i < allColliders.Count; i++)
{
if (allColliders[i].transform.tag == "AttackTarget")
if (allColliders[i].gameObject.tag == "AttackTarget" && !allColliders[i].isTrigger && !attackColliders1.Contains(allColliders[i]))
attackColliders1.Add(allColliders[i]);
}
if (wrjModel == WRJModel.)
}
if (wrjModel == WRJModel.)
{
WRJAttach.Invoke(attackColliders1);
}
if (wrjModel == WRJModel.)
{
if (attackColliders1.Count > 0)
{
if (attackColliders1.Count > 0)
for (int i = 0; i < attackColliders1.Count; i++)
{
List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null && x.gameObject.activeSelf);
for (int i = 0; i < _unmannedAerialVehicles.Count; i++)
Collider c = null;
if (attackColliders1[i] != null)
{
if (_unmannedAerialVehicles[i].attackTarget == null)
{
SendMsg(attackColliders1[i].transform);
_unmannedAerialVehicles[i].AttAck(attackColliders1[i].transform);
}
c = attackColliders1[i];
}
if (unmannedAerialVehicles[0].attackTarget == null)
{
SendMsg(c.transform);
unmannedAerialVehicles[0].AttAck(c.transform);
}
}
}
if (wrjModel == WRJModel.)
{
WRJAttach.Invoke(attackColliders1);
}
}
}
public Collider currentCollider;
public void SetCollider4WRJ(List<Collider> attackColliders)
{
DeviceManager.Instance.SetCollider4WRJ(attackColliders);
DeviceManager.Instance.SetCollider4WRJ(attackColliders, ref currentCollider);
if (currentCollider != null)
SendMsg(currentCollider.transform);
}
public void SendMsg(Transform attackTarget)
@ -478,7 +481,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
StartCoroutine(WeaponitemoneDataAddition());
}
SwitchWRJModel();
}
}