diff --git a/Assets/Scenes/GameScene.unity b/Assets/Scenes/GameScene.unity index 214be46c..88b1208f 100644 --- a/Assets/Scenes/GameScene.unity +++ b/Assets/Scenes/GameScene.unity @@ -278,14 +278,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 471442431} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: 4.4, y: 7.48, z: 17.23} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 551772365} m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} --- !u!1 &551772362 GameObject: m_ObjectHideFlags: 0 @@ -375,6 +375,7 @@ MonoBehaviour: bulletSpawn: - {fileID: 1160531882} - {fileID: 471442432} + fireRange: 100000 --- !u!1001 &564820385 PrefabInstance: m_ObjectHideFlags: 0 @@ -589,6 +590,103 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &717515407 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 717515408} + - component: {fileID: 717515411} + - component: {fileID: 717515410} + - component: {fileID: 717515409} + m_Layer: 0 + m_Name: Cube (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &717515408 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 717515407} + m_LocalRotation: {x: -0, y: -0.7116755, z: -0, w: 0.7025084} + m_LocalPosition: {x: -347, y: 524.14136, z: 1166} + m_LocalScale: {x: 38.93435, y: 133.10486, z: 2879.3652} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1902512188} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: -90.743, z: 0} +--- !u!65 &717515409 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 717515407} + 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 &717515410 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 717515407} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &717515411 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 717515407} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1001 &723575406 PrefabInstance: m_ObjectHideFlags: 0 @@ -718,99 +816,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: OreHp: 100 ---- !u!1 &751070920 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 751070923} - - component: {fileID: 751070922} - - component: {fileID: 751070921} - - component: {fileID: 751070924} - m_Layer: 0 - m_Name: Terrain - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 2147483647 - m_IsActive: 0 ---- !u!154 &751070921 -TerrainCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 751070920} - m_Material: {fileID: 0} - m_Enabled: 1 - m_TerrainData: {fileID: 15600000, guid: ad953af6f0b0959469c99a58fffb1a82, type: 2} - m_EnableTreeColliders: 1 ---- !u!218 &751070922 -Terrain: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 751070920} - m_Enabled: 1 - serializedVersion: 6 - m_TerrainData: {fileID: 15600000, guid: ad953af6f0b0959469c99a58fffb1a82, type: 2} - m_TreeDistance: 5000 - m_TreeBillboardDistance: 50 - m_TreeCrossFadeLength: 5 - m_TreeMaximumFullLODCount: 50 - m_DetailObjectDistance: 80 - m_DetailObjectDensity: 1 - m_HeightmapPixelError: 5 - m_SplatMapDistance: 1000 - m_HeightmapMaximumLOD: 0 - m_ShadowCastingMode: 2 - m_DrawHeightmap: 1 - m_DrawInstanced: 0 - m_DrawTreesAndFoliage: 1 - m_StaticShadowCaster: 0 - m_ReflectionProbeUsage: 1 - m_MaterialTemplate: {fileID: 10652, guid: 0000000000000000f000000000000000, type: 0} - m_BakeLightProbesForTrees: 1 - m_PreserveTreePrototypeLayers: 0 - m_DeringLightProbesForTrees: 1 - m_ScaleInLightmap: 0.0256 - m_LightmapParameters: {fileID: 15203, guid: 0000000000000000f000000000000000, type: 0} - m_GroupingID: 0 - m_RenderingLayerMask: 1 - m_AllowAutoConnect: 1 ---- !u!4 &751070923 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 751070920} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 2.8809, y: 2.8809, z: 2.8809} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!64 &751070924 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 751070920} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 0 - serializedVersion: 4 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 0} --- !u!1001 &870622706 PrefabInstance: m_ObjectHideFlags: 0 @@ -844,7 +849,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7695382262159251195, guid: ccaf4affb26fa0d44ae2c5195096ae23, type: 3} propertyPath: m_RootOrder - value: 4 + value: 3 objectReference: {fileID: 0} - target: {fileID: 7695382262159251195, guid: ccaf4affb26fa0d44ae2c5195096ae23, type: 3} propertyPath: m_LocalScale.x @@ -1027,6 +1032,103 @@ MonoBehaviour: rotationSmoothSpeed: 10 maxDistance: 10 minDistance: 2 +--- !u!1 &1067516681 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1067516682} + - component: {fileID: 1067516685} + - component: {fileID: 1067516684} + - component: {fileID: 1067516683} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1067516682 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067516681} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1627, y: 524.14136, z: 2} + m_LocalScale: {x: 38.93435, y: 133.10486, z: 2879.3652} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1902512188} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1067516683 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067516681} + 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 &1067516684 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067516681} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1067516685 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067516681} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1110618722 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100000, guid: 152fa45dabcbb324aa494574f578e2b5, type: 3} @@ -1055,14 +1157,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1160531881} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: 0, y: -0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -4.68, y: 7.23, z: 17.11} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 551772365} m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} --- !u!1001 &1195250373 PrefabInstance: m_ObjectHideFlags: 0 @@ -1158,6 +1260,7 @@ GameObject: - component: {fileID: 1324451148} - component: {fileID: 1324451147} - component: {fileID: 1324451151} + - component: {fileID: 1324451152} m_Layer: 0 m_Name: Plane m_TagString: Untagged @@ -1236,13 +1339,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1324451146} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -338.5116, y: 524.14136, z: 3.9706116} m_LocalScale: {x: 286.53995, y: 286.53995, z: 286.53995} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 + m_Father: {fileID: 1902512188} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1324451151 BoxCollider: @@ -1257,6 +1360,22 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 10.000001, y: 2.2204463e-16, z: 10.000001} m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &1324451152 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1324451146} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 126 + m_CollisionDetection: 0 --- !u!1 &1414258679 stripped GameObject: m_CorrespondingSourceObject: {fileID: 100000, guid: 152fa45dabcbb324aa494574f578e2b5, type: 3} @@ -1304,6 +1423,103 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: OreHp: 100 +--- !u!1 &1426147315 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1426147316} + - component: {fileID: 1426147319} + - component: {fileID: 1426147318} + - component: {fileID: 1426147317} + m_Layer: 0 + m_Name: Cube (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1426147316 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1426147315} + m_LocalRotation: {x: -0, y: -0.7116755, z: -0, w: 0.7025084} + m_LocalPosition: {x: -347, y: 524.14136, z: -1253} + m_LocalScale: {x: 38.93435, y: 133.10486, z: 2879.3652} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1902512188} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: -90.743, z: 0} +--- !u!65 &1426147317 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1426147315} + 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 &1426147318 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1426147315} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1426147319 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1426147315} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1001 &1502306325 PrefabInstance: m_ObjectHideFlags: 0 @@ -1506,6 +1722,103 @@ Transform: m_CorrespondingSourceObject: {fileID: 400000, guid: d638cc32d98ca2b458e7d672e6b5d561, type: 3} m_PrefabInstance: {fileID: 1574596279} m_PrefabAsset: {fileID: 0} +--- !u!1 &1710887918 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1710887919} + - component: {fileID: 1710887922} + - component: {fileID: 1710887921} + - component: {fileID: 1710887920} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1710887919 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1710887918} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 878, y: 524.14136, z: 2} + m_LocalScale: {x: 38.93435, y: 133.10486, z: 2879.3652} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1902512188} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1710887920 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1710887918} + 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 &1710887921 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1710887918} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + 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 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1710887922 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1710887918} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1001 &1827496785 PrefabInstance: m_ObjectHideFlags: 0 @@ -1635,6 +1948,42 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 126 m_CollisionDetection: 0 +--- !u!1 &1902512187 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1902512188} + m_Layer: 0 + m_Name: EN + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1902512188 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1902512187} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 338.5116, y: -524.14136, z: -3.9706116} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1324451150} + - {fileID: 1067516682} + - {fileID: 1710887919} + - {fileID: 1426147316} + - {fileID: 717515408} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1917679239 GameObject: m_ObjectHideFlags: 0 @@ -1670,7 +2019,7 @@ Transform: - {fileID: 1195250374} - {fileID: 1574596280} m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1978476583 stripped GameObject: diff --git a/Assets/prefabs/Bullet_GoldFire.prefab b/Assets/prefabs/Bullet_GoldFire.prefab index c26010b8..1b735e00 100644 --- a/Assets/prefabs/Bullet_GoldFire.prefab +++ b/Assets/prefabs/Bullet_GoldFire.prefab @@ -33389,7 +33389,7 @@ Transform: m_GameObject: {fileID: 1879272669879180} 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_LocalScale: {x: 3, y: 3, z: 3} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 4202549611881306} diff --git a/Assets/prefabs/Bullet_GoldFire_Small_MuzzleFlare.prefab b/Assets/prefabs/Bullet_GoldFire_Small_MuzzleFlare.prefab index bf3aac3e..710a1d75 100644 --- a/Assets/prefabs/Bullet_GoldFire_Small_MuzzleFlare.prefab +++ b/Assets/prefabs/Bullet_GoldFire_Small_MuzzleFlare.prefab @@ -4785,7 +4785,7 @@ Transform: m_GameObject: {fileID: 1000012903210382} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 10, y: 10, z: 10} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 4000012572821648} diff --git a/Assets/prefabs/Bullet_GoldFire_Small_Projectile.prefab b/Assets/prefabs/Bullet_GoldFire_Small_Projectile.prefab index fe1fe890..720ca0e5 100644 --- a/Assets/prefabs/Bullet_GoldFire_Small_Projectile.prefab +++ b/Assets/prefabs/Bullet_GoldFire_Small_Projectile.prefab @@ -29,7 +29,7 @@ Transform: m_GameObject: {fileID: 1238843893459588} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 10, y: 10, z: 10} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 4749193282715014} diff --git a/Assets/scripts/Bullet.cs b/Assets/scripts/Bullet.cs index 296cfc00..949f2984 100644 --- a/Assets/scripts/Bullet.cs +++ b/Assets/scripts/Bullet.cs @@ -23,6 +23,10 @@ public class Bullet : MonoBehaviour ore.OreHpDown(harm); DesSelf(); } + else + { + Destroy(this.gameObject); + } } diff --git a/Assets/scripts/Shoot.cs b/Assets/scripts/Shoot.cs index e781a2b0..01b37942 100644 --- a/Assets/scripts/Shoot.cs +++ b/Assets/scripts/Shoot.cs @@ -7,29 +7,27 @@ public class Shoot : MonoBehaviour public GameObject bulletPrefab; // 子弹预制体 public GameObject firePrefab; public Transform[] bulletSpawn; // 子弹生成位置 - + public float fireRange = 10000f; // 射程 void Update() { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hitInfo; + // 如果鼠标左键点击 if (Input.GetMouseButtonDown(0)) { - if (Physics.Raycast(ray, out hitInfo)) + // 射线检测 + if (Physics.Raycast(ray, out hitInfo, fireRange)) { - //射线选择人物 - if (hitInfo.collider.gameObject.name == "enemy") - { - FireWeapon(hitInfo.collider.gameObject.transform); - GoldFirePoint(); - } - //射线选择矿石 - if (hitInfo.collider.gameObject.tag == "ore") - { - FireWeapon(hitInfo.collider.gameObject.transform); - GoldFirePoint(); - } + // 获取射线击中的位置 + Vector3 targetPosition = hitInfo.point; + + // 让武器指向目标位置 + FireWeapon(targetPosition); + + // 或者你也可以用这个位置进行其他逻辑处理 + GoldFirePoint(); } } } @@ -40,16 +38,25 @@ public class Shoot : MonoBehaviour Destroy(fireobj0, 0.5f); Destroy(fireobj1,0.5f); } - private void FireWeapon(Transform transform) + void FireWeapon(Vector3 targetPosition) { - GameObject bullet = Instantiate(bulletPrefab, bulletSpawn[0].position, bulletSpawn[0].rotation); - bullet.transform.DOMove(transform.position,0.5f); - GameObject bullet1 = Instantiate(bulletPrefab, bulletSpawn[1].position, bulletSpawn[1].rotation); - bullet1.transform.DOMove(transform.position, 0.5f); + + // 计算从武器到目标位置的方向 + Vector3 direction = targetPosition - this.transform.position; + + // 使武器朝着目标位置旋转 + Quaternion rotation = Quaternion.LookRotation(direction); + bullet.transform.rotation = rotation; + bullet1.transform.rotation = rotation; + + bullet.transform.DOMove(targetPosition, 0.5f); + bullet1.transform.DOMove(targetPosition, 0.5f); } + + }