diff --git a/Assets/Data.meta b/Assets/Data.meta new file mode 100644 index 0000000..3089bea --- /dev/null +++ b/Assets/Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 867ddf387507b274fb845ab1209d4430 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Data/Weapons.meta b/Assets/Data/Weapons.meta new file mode 100644 index 0000000..be061cb --- /dev/null +++ b/Assets/Data/Weapons.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 718bc091e590bd442b2c5b9935d11de5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Data/Weapons/AK74.asset b/Assets/Data/Weapons/AK74.asset new file mode 100644 index 0000000..966ebb2 --- /dev/null +++ b/Assets/Data/Weapons/AK74.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 034e069ed5f7d6d4ba3d9e64bb0f44e8, type: 3} + m_Name: AK74 + m_EditorClassIdentifier: Assembly-CSharp::WeaponData + weaponName: AK74 + fullAuto: 1 + damage: 45 + pellets: 1 + pelletSpread: 0 + range: 200 + fireInterval: 0.1 + magazineSize: 30 + reloadTime: 2.2 + verticalFirstShots: 5 + verticalFirst: 0.3 + verticalAfter: 0.2 + horizontalStep: 0.12 + horizontalRightFrom: 6 + horizontalLeftFrom: 16 + horizontalEndAt: 25 + horizontalRandom: 0.05 + recoverDelay: 0.15 + recoverSpeed: 10 + modelKickBack: 0.03 diff --git a/Assets/Data/Weapons/AK74.asset.meta b/Assets/Data/Weapons/AK74.asset.meta new file mode 100644 index 0000000..8e70ed2 --- /dev/null +++ b/Assets/Data/Weapons/AK74.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6e875557982d8ef48b87484eb9862c3a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Data/Weapons/Benelli_M4.asset b/Assets/Data/Weapons/Benelli_M4.asset new file mode 100644 index 0000000..b6401c5 --- /dev/null +++ b/Assets/Data/Weapons/Benelli_M4.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 034e069ed5f7d6d4ba3d9e64bb0f44e8, type: 3} + m_Name: Benelli_M4 + m_EditorClassIdentifier: Assembly-CSharp::WeaponData + weaponName: Benelli_M4 + fullAuto: 0 + damage: 30 + pellets: 8 + pelletSpread: 2.5 + range: 200 + fireInterval: 0.45 + magazineSize: 7 + reloadTime: 2.5 + verticalFirstShots: 5 + verticalFirst: 1 + verticalAfter: 1 + horizontalStep: 0 + horizontalRightFrom: 6 + horizontalLeftFrom: 16 + horizontalEndAt: 25 + horizontalRandom: 0 + recoverDelay: 0.15 + recoverSpeed: 10 + modelKickBack: 0.03 diff --git a/Assets/Data/Weapons/Benelli_M4.asset.meta b/Assets/Data/Weapons/Benelli_M4.asset.meta new file mode 100644 index 0000000..925f196 --- /dev/null +++ b/Assets/Data/Weapons/Benelli_M4.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b4c2e2cac30ab9f43b2d00181a60b570 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Data/Weapons/M1911.asset b/Assets/Data/Weapons/M1911.asset new file mode 100644 index 0000000..684c721 --- /dev/null +++ b/Assets/Data/Weapons/M1911.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 034e069ed5f7d6d4ba3d9e64bb0f44e8, type: 3} + m_Name: M1911 + m_EditorClassIdentifier: Assembly-CSharp::WeaponData + weaponName: M1911 + fullAuto: 0 + damage: 50 + pellets: 1 + pelletSpread: 0 + range: 200 + fireInterval: 0.143 + magazineSize: 12 + reloadTime: 1.2 + verticalFirstShots: 5 + verticalFirst: 0 + verticalAfter: 0 + horizontalStep: 0 + horizontalRightFrom: 6 + horizontalLeftFrom: 16 + horizontalEndAt: 25 + horizontalRandom: 0 + recoverDelay: 0.15 + recoverSpeed: 10 + modelKickBack: 0.03 diff --git a/Assets/Data/Weapons/M1911.asset.meta b/Assets/Data/Weapons/M1911.asset.meta new file mode 100644 index 0000000..fa93fb2 --- /dev/null +++ b/Assets/Data/Weapons/M1911.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb7e31faaaf217245adc2c25480113fd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Data/Weapons/Uzi.asset b/Assets/Data/Weapons/Uzi.asset new file mode 100644 index 0000000..1b8b8d0 --- /dev/null +++ b/Assets/Data/Weapons/Uzi.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 034e069ed5f7d6d4ba3d9e64bb0f44e8, type: 3} + m_Name: Uzi + m_EditorClassIdentifier: Assembly-CSharp::WeaponData + weaponName: Uzi + fullAuto: 1 + damage: 30 + pellets: 1 + pelletSpread: 0 + range: 200 + fireInterval: 0.056 + magazineSize: 32 + reloadTime: 1.8 + verticalFirstShots: 5 + verticalFirst: 0.18 + verticalAfter: 0.18 + horizontalStep: 0 + horizontalRightFrom: 6 + horizontalLeftFrom: 16 + horizontalEndAt: 25 + horizontalRandom: 0.3 + recoverDelay: 0.15 + recoverSpeed: 10 + modelKickBack: 0.03 diff --git a/Assets/Data/Weapons/Uzi.asset.meta b/Assets/Data/Weapons/Uzi.asset.meta new file mode 100644 index 0000000..999c9c6 --- /dev/null +++ b/Assets/Data/Weapons/Uzi.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dd1219c9237d3b942a0a51d5c4721639 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Low Poly/Low Poly Weapons VOL.1/Gun_MAT.mat b/Assets/Low Poly/Low Poly Weapons VOL.1/Gun_MAT.mat index 5344940..e1a75d3 100644 --- a/Assets/Low Poly/Low Poly Weapons VOL.1/Gun_MAT.mat +++ b/Assets/Low Poly/Low Poly Weapons VOL.1/Gun_MAT.mat @@ -1,5 +1,18 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7068433517453073436 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion + version: 10 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -8,7 +21,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Gun_MAT - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] @@ -17,12 +30,18 @@ Material: m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 2800000, guid: 6a376fb3e11ce334ca96f417cead6576, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -59,12 +78,39 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0 - _GlossyReflections: 1 @@ -72,13 +118,22 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 - _UVSec: 0 + - _WorkflowMode: 1 + - _XRMotionVectorsPass: 1 - _ZWrite: 1 m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/Assets/Scenes/Test.meta b/Assets/Scenes/Test.meta new file mode 100644 index 0000000..af51893 --- /dev/null +++ b/Assets/Scenes/Test.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d14cc60656b2be04c864070cd5a734bf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Test.unity b/Assets/Scenes/Test.unity index 814efb9..93c26cc 100644 --- a/Assets/Scenes/Test.unity +++ b/Assets/Scenes/Test.unity @@ -93,7 +93,7 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} + m_LightingDataAsset: {fileID: 112000002, guid: 73c00c30e1392b04f8c9937c75c39417, type: 2} m_LightingSettings: {fileID: 0} --- !u!196 &4 NavMeshSettings: @@ -152,6 +152,86 @@ Transform: - {fileID: 1836508463} m_Father: {fileID: 1878619971} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1531381 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1531382} + - component: {fileID: 1531384} + - component: {fileID: 1531383} + m_Layer: 0 + m_Name: y + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1531382 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1531381} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1206621907} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 30, y: 2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1531383 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1531381} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1531384 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1531381} + m_CullTransparentMesh: 1 +--- !u!4 &61442096 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + m_PrefabInstance: {fileID: 831964107} + m_PrefabAsset: {fileID: 0} --- !u!1 &71948076 GameObject: m_ObjectHideFlags: 0 @@ -264,6 +344,62 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 71948076} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &222754115 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 222754116} + - component: {fileID: 222754117} + m_Layer: 0 + m_Name: Weapon_AK74 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &222754116 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 222754115} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1281847098} + m_Father: {fileID: 1725909304} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &222754117 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 222754115} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 86c6b5cad2146e242a41f45e2e6eedfc, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::HitscanWeapon + data: {fileID: 11400000, guid: 6e875557982d8ef48b87484eb9862c3a, type: 2} + aimCamera: {fileID: 1725909303} + playerLook: {fileID: 1645462138} + playerRoot: {fileID: 1079595525} + muzzleFlashPrefab: {fileID: 0} + muzzlePoint: {fileID: 0} +--- !u!4 &255980593 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + m_PrefabInstance: {fileID: 563172845} + m_PrefabAsset: {fileID: 0} --- !u!1 &272018231 GameObject: m_ObjectHideFlags: 0 @@ -556,6 +692,81 @@ Transform: - {fileID: 1932967233} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &296668449 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 296668450} + - component: {fileID: 296668452} + - component: {fileID: 296668451} + m_Layer: 0 + m_Name: x + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &296668450 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296668449} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1206621907} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 2, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &296668451 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296668449} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &296668452 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 296668449} + m_CullTransparentMesh: 1 --- !u!1 &343785178 GameObject: m_ObjectHideFlags: 0 @@ -892,6 +1103,63 @@ Transform: m_Children: [] m_Father: {fileID: 296469658} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &563172845 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1307964928} + m_Modifications: + - target: {fileID: 100000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_Name + value: Bennelli_M4 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalPosition.x + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalPosition.y + value: -0.15 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalPosition.z + value: 0.27 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: bf2593fe0c804b84688e307cfb1ddfae, type: 3} --- !u!1 &573989629 GameObject: m_ObjectHideFlags: 0 @@ -1004,6 +1272,16 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 573989629} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &577926589 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + m_PrefabInstance: {fileID: 1703214673} + m_PrefabAsset: {fileID: 0} +--- !u!1 &582400649 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1948975875556684, guid: 95354847711d363408aebd57a0dc92ae, type: 3} + m_PrefabInstance: {fileID: 1071213714} + m_PrefabAsset: {fileID: 0} --- !u!4 &584116800 stripped Transform: m_CorrespondingSourceObject: {fileID: 4679105028047868, guid: 95354847711d363408aebd57a0dc92ae, type: 3} @@ -1233,6 +1511,138 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 728537469} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &830018035 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 830018036} + - component: {fileID: 830018038} + - component: {fileID: 830018037} + m_Layer: 0 + m_Name: HitTips + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &830018036 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 830018035} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1444524435} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: -150} + m_SizeDelta: {x: 200, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &830018037 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 830018035} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &830018038 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 830018035} + m_CullTransparentMesh: 1 +--- !u!1001 &831964107 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1012003127} + m_Modifications: + - target: {fileID: 100010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_Name + value: Uzi + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalPosition.x + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalPosition.y + value: -0.15 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalPosition.z + value: 0.27 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 400010, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: ff8c9f278b5bc8e4c894e1122f4a81f3, type: 3} --- !u!1001 &889386004 PrefabInstance: m_ObjectHideFlags: 0 @@ -1341,8 +1751,13 @@ PrefabInstance: propertyPath: m_Name value: Player objectReference: {fileID: 0} + - target: {fileID: 8495746665912432550, guid: bfc6516b5bd5c3547bb15ad34d8e83a2, type: 3} + propertyPath: m_LocalPosition.z + value: 0.041 + objectReference: {fileID: 0} m_RemovedComponents: [] - m_RemovedGameObjects: [] + m_RemovedGameObjects: + - {fileID: 2418164506756740957, guid: bfc6516b5bd5c3547bb15ad34d8e83a2, type: 3} m_AddedGameObjects: - targetCorrespondingSourceObject: {fileID: 4147227460239450441, guid: bfc6516b5bd5c3547bb15ad34d8e83a2, type: 3} insertIndex: -1 @@ -1352,6 +1767,57 @@ PrefabInstance: insertIndex: -1 addedObject: {fileID: 1079595526} m_SourcePrefab: {fileID: 100100000, guid: bfc6516b5bd5c3547bb15ad34d8e83a2, type: 3} +--- !u!1 &1012003126 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1012003127} + - component: {fileID: 1012003128} + m_Layer: 0 + m_Name: Weapon_Uzi + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1012003127 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1012003126} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 61442096} + m_Father: {fileID: 1725909304} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1012003128 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1012003126} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 86c6b5cad2146e242a41f45e2e6eedfc, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::HitscanWeapon + data: {fileID: 11400000, guid: dd1219c9237d3b942a0a51d5c4721639, type: 2} + aimCamera: {fileID: 1725909303} + playerLook: {fileID: 1645462138} + playerRoot: {fileID: 1079595525} + muzzleFlashPrefab: {fileID: 0} + muzzlePoint: {fileID: 0} --- !u!1001 &1071213714 PrefabInstance: m_ObjectHideFlags: 0 @@ -1438,24 +1904,28 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 224973348475522934, guid: 95354847711d363408aebd57a0dc92ae, type: 3} insertIndex: -1 addedObject: {fileID: 1757917379} - m_AddedComponents: [] + - targetCorrespondingSourceObject: {fileID: 224973348475522934, guid: 95354847711d363408aebd57a0dc92ae, type: 3} + insertIndex: -1 + addedObject: {fileID: 1206621907} + - targetCorrespondingSourceObject: {fileID: 224973348475522934, guid: 95354847711d363408aebd57a0dc92ae, type: 3} + insertIndex: -1 + addedObject: {fileID: 830018036} + - targetCorrespondingSourceObject: {fileID: 224973348475522934, guid: 95354847711d363408aebd57a0dc92ae, type: 3} + insertIndex: -1 + addedObject: {fileID: 1329805853} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 1948975875556684, guid: 95354847711d363408aebd57a0dc92ae, type: 3} + insertIndex: -1 + addedObject: {fileID: 1444524439} + - targetCorrespondingSourceObject: {fileID: 1948975875556684, guid: 95354847711d363408aebd57a0dc92ae, type: 3} + insertIndex: -1 + addedObject: {fileID: 1444524438} m_SourcePrefab: {fileID: 100100000, guid: 95354847711d363408aebd57a0dc92ae, type: 3} --- !u!1 &1079595519 stripped GameObject: m_CorrespondingSourceObject: {fileID: 7032828090453369528, guid: bfc6516b5bd5c3547bb15ad34d8e83a2, type: 3} m_PrefabInstance: {fileID: 889386004} m_PrefabAsset: {fileID: 0} ---- !u!114 &1079595521 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 5289357657740055917, guid: bfc6516b5bd5c3547bb15ad34d8e83a2, type: 3} - m_PrefabInstance: {fileID: 889386004} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1079595519} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6996d94b5d6e41a19dc870ec636ec3f5, type: 3} - m_Name: - m_EditorClassIdentifier: CharacterMovement.Core::CharacterMovement.PlayerController --- !u!136 &1079595523 stripped CapsuleCollider: m_CorrespondingSourceObject: {fileID: 7901344025037588819, guid: bfc6516b5bd5c3547bb15ad34d8e83a2, type: 3} @@ -1478,11 +1948,100 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 06b88da6823af764aad14492a31438c0, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::ApexMovementRules - playerController: {fileID: 1079595521} - sprintForwardOnly: 1 - forwardThreshold: 0.5 - autoSprint: 1 - slideOnLanding: 1 +--- !u!1001 &1168140095 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 222754116} + m_Modifications: + - target: {fileID: 100000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_Name + value: AK74 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalPosition.x + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalPosition.y + value: -0.15 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalPosition.z + value: 0.27 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} +--- !u!1 &1206621906 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1206621907} + m_Layer: 0 + m_Name: Crosshair + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1206621907 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1206621906} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 296668450} + - {fileID: 1531382} + m_Father: {fileID: 1444524435} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1229209695 GameObject: m_ObjectHideFlags: 0 @@ -1643,6 +2202,199 @@ Transform: - {fileID: 296009948} m_Father: {fileID: 1878619971} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1281847098 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 400000, guid: 6f966b9a7c817ed49973b4a8762cbbdf, type: 3} + m_PrefabInstance: {fileID: 1168140095} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1307964927 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1307964928} + - component: {fileID: 1307964929} + m_Layer: 0 + m_Name: Weapon_Benelli + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1307964928 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1307964927} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 255980593} + m_Father: {fileID: 1725909304} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1307964929 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1307964927} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 86c6b5cad2146e242a41f45e2e6eedfc, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::HitscanWeapon + data: {fileID: 11400000, guid: b4c2e2cac30ab9f43b2d00181a60b570, type: 2} + aimCamera: {fileID: 1725909303} + playerLook: {fileID: 1645462138} + playerRoot: {fileID: 1079595525} + muzzleFlashPrefab: {fileID: 0} + muzzlePoint: {fileID: 0} +--- !u!1 &1329805852 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1329805853} + - component: {fileID: 1329805855} + - component: {fileID: 1329805854} + m_Layer: 0 + m_Name: Ammo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1329805853 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1329805852} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1444524435} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -200, y: 50} + m_SizeDelta: {x: 400, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1329805854 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1329805852} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 30/240 + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: a90984eb310cd5a449f31c00582b648a, type: 2} + m_sharedMaterial: {fileID: 2808115657558496897, guid: a90984eb310cd5a449f31c00582b648a, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 72 + m_fontSizeBase: 36 + m_fontWeight: 400 + m_enableAutoSizing: 1 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 4 + m_VerticalAlignment: 1024 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_characterHorizontalScale: 1 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_TextWrappingMode: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_ActiveFontFeatures: 6e72656b + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_EmojiFallbackSupport: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &1329805855 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1329805852} + m_CullTransparentMesh: 1 --- !u!1 &1402397389 GameObject: m_ObjectHideFlags: 0 @@ -1760,6 +2512,41 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 224973348475522934, guid: 95354847711d363408aebd57a0dc92ae, type: 3} m_PrefabInstance: {fileID: 1071213714} m_PrefabAsset: {fileID: 0} +--- !u!114 &1444524438 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 582400649} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c9a11a2deaee4fe498a75ccc7ce89ee7, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::WeaponLoadout + weapons: + - {fileID: 1869601024} + - {fileID: 222754117} + - {fileID: 1012003128} + - {fileID: 1307964929} +--- !u!114 &1444524439 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 582400649} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f5da41ae4773f7419675bd3ff836b02, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::WeaponHUD + loadout: {fileID: 1444524438} + hitMarker: {fileID: 830018037} + ammoText: {fileID: 1329805854} + bodyColor: {r: 1, g: 1, b: 1, a: 1} + headColor: {r: 1, g: 0.25, b: 0.25, a: 1} + hitMarkerTime: 0.1 --- !u!1 &1645462136 GameObject: m_ObjectHideFlags: 0 @@ -1811,6 +2598,63 @@ MonoBehaviour: eyeHeightSpeed: 12 maxPitch: 89 sensitivityScale: 1 +--- !u!1001 &1703214673 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1869601023} + m_Modifications: + - target: {fileID: 100004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_Name + value: M1911 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalPosition.x + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalPosition.y + value: -0.15 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalPosition.z + value: 0.27 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b812e42521a5a27499e76cc5ed56e3ac, type: 3} --- !u!1 &1705438074 GameObject: m_ObjectHideFlags: 0 @@ -1982,9 +2826,9 @@ Camera: y: 0 width: 1 height: 1 - near clip plane: 0.3 + near clip plane: 0.02 far clip plane: 1000 - field of view: 60 + field of view: 70 orthographic: 0 orthographic size: 5 m_Depth: -1 @@ -2016,6 +2860,10 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 584116800} + - {fileID: 1869601023} + - {fileID: 222754116} + - {fileID: 1012003127} + - {fileID: 1307964928} m_Father: {fileID: 1645462137} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1725909305 @@ -2324,6 +3172,57 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1836508462} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1869601022 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1869601023} + - component: {fileID: 1869601024} + m_Layer: 0 + m_Name: Weapon_M1911 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1869601023 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1869601022} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 577926589} + m_Father: {fileID: 1725909304} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1869601024 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1869601022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 86c6b5cad2146e242a41f45e2e6eedfc, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::HitscanWeapon + data: {fileID: 11400000, guid: cb7e31faaaf217245adc2c25480113fd, type: 2} + aimCamera: {fileID: 1725909303} + playerLook: {fileID: 1645462138} + playerRoot: {fileID: 1079595525} + muzzleFlashPrefab: {fileID: 0} + muzzlePoint: {fileID: 0} --- !u!1 &1878619970 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/Test/LightingData.asset b/Assets/Scenes/Test/LightingData.asset new file mode 100644 index 0000000..1ebdfee Binary files /dev/null and b/Assets/Scenes/Test/LightingData.asset differ diff --git a/Assets/Scenes/Test/LightingData.asset.meta b/Assets/Scenes/Test/LightingData.asset.meta new file mode 100644 index 0000000..9fd4f21 --- /dev/null +++ b/Assets/Scenes/Test/LightingData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 73c00c30e1392b04f8c9937c75c39417 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 6475696996188705980 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Test/ReflectionProbe-0.exr b/Assets/Scenes/Test/ReflectionProbe-0.exr new file mode 100644 index 0000000..f38e702 Binary files /dev/null and b/Assets/Scenes/Test/ReflectionProbe-0.exr differ diff --git a/Assets/Scenes/Test/ReflectionProbe-0.exr.meta b/Assets/Scenes/Test/ReflectionProbe-0.exr.meta new file mode 100644 index 0000000..a58c466 --- /dev/null +++ b/Assets/Scenes/Test/ReflectionProbe-0.exr.meta @@ -0,0 +1,130 @@ +fileFormatVersion: 2 +guid: 6bc187e5ae9d5b449a0bdce8d299a40e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 1 + seamlessCubemap: 1 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Stript/InGame/Bot.meta b/Assets/Stript/InGame/Bot.meta new file mode 100644 index 0000000..9ad9787 --- /dev/null +++ b/Assets/Stript/InGame/Bot.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f58858b2fc0701f449d37658ff31934c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Stript/InGame/Bot/BotBrain.cs b/Assets/Stript/InGame/Bot/BotBrain.cs new file mode 100644 index 0000000..2d09199 --- /dev/null +++ b/Assets/Stript/InGame/Bot/BotBrain.cs @@ -0,0 +1,130 @@ +using System; +using UnityEngine; +using CharacterMovement; + +// 機器人的 AI : 代替鍵盤餵輸入給 MotionCore 的 PlayerController,物理和玩家完全一樣 +// 行為 : 面向玩家,隨機左右橫移,偶爾停頓、跳躍、滑鏟 +[RequireComponent(typeof(PlayerController))] +public class BotBrain : MonoBehaviour, ICharacterInputSource +{ + [Header("目標 (由 BotSpawner 設定)")] + public Transform target; + + [Header("活動範圍 (由 BotSpawner 設定)")] + public Vector3 areaCenter; + public float areaRadius = 15f; + + [Header("橫移")] + [Tooltip("每段橫移的持續時間範圍 (秒)")] + public Vector2 strafeDuration = new Vector2(0.3f, 1.2f); + + [Tooltip("每段結束時改成停頓的機率")] + [Range(0f, 1f)] public float pauseChance = 0.15f; + + [Header("跳躍 / 滑鏟 (每段開始時判定一次)")] + [Range(0f, 1f)] public float jumpChance = 0.15f; + [Range(0f, 1f)] public float slideChance = 0.1f; + + [Tooltip("滑鏟時按住蹲下的時間 (秒)")] + public float slideHoldTime = 0.6f; + + private PlayerController player; + private Rigidbody body; + private float segmentTimer; + private float jumpHeldTimer; + private float slideTimer; + + // ===== ICharacterInputSource : MotionCore 每幀讀這些值 ===== + public Vector2 MoveDirection { get; private set; } + public bool IsMoving => MoveDirection.sqrMagnitude > 0.0001f; + public bool IsSprinting => slideTimer > 0f; // 滑鏟要在衝刺中才能觸發 + public bool IsWalking => false; + public bool IsCrouching => slideTimer > 0f; + public bool IsProne => false; + public bool IsJumpHeld => jumpHeldTimer > 0f; + + public event Action JumpPerformed; + public event Action CrouchPerformed; +#pragma warning disable 0067 // 介面要求,但機器人不會衝刺技能和趴下 + public event Action DashPerformed; + public event Action PronePerformed; +#pragma warning restore 0067 + // ========================================================== + + void Awake() + { + player = GetComponent(); + body = GetComponent(); + + // 朝向由這裡控制 (面向玩家),不讓 MotionCore 把身體轉向移動方向 + player.SetMovementFacingEnabled(false); + } + + void Update() + { + // PlayerController 在自己的 Start 才設定輸入來源,所以等到 Update 才換成自己 + if (!ReferenceEquals(player.InputSource, this)) + { + player.SetInputSource(this); + } + + float dt = Time.deltaTime; + if (jumpHeldTimer > 0f) jumpHeldTimer -= dt; + if (slideTimer > 0f) slideTimer -= dt; + + segmentTimer -= dt; + if (segmentTimer <= 0f) + { + StartNewSegment(); + } + } + + void FixedUpdate() + { + // 只轉水平方向面向玩家,移動方向是相對於自己的朝向,所以左右就是對玩家橫移 + if (target == null || body == null) return; + + Vector3 toTarget = Vector3.ProjectOnPlane(target.position - body.position, Vector3.up); + if (toTarget.sqrMagnitude > 0.01f) + { + body.MoveRotation(Quaternion.LookRotation(toTarget.normalized, Vector3.up)); + } + } + + void StartNewSegment() + { + segmentTimer = UnityEngine.Random.Range(strafeDuration.x, strafeDuration.y); + + if (UnityEngine.Random.value < pauseChance) + { + MoveDirection = Vector2.zero; + return; + } + + MoveDirection = PickMoveDirection(); + + if (UnityEngine.Random.value < jumpChance) + { + jumpHeldTimer = 0.25f; // 按住一下才會跳到完整高度 + JumpPerformed?.Invoke(); + } + else if (UnityEngine.Random.value < slideChance) + { + slideTimer = slideHoldTime; // 先讓 IsSprinting / IsCrouching 成立,再送出蹲下 + CrouchPerformed?.Invoke(); + } + } + + // 平常隨機往左或往右 ; 跑出活動範圍時直接往中心走 (用自己朝向的座標表示) + Vector2 PickMoveDirection() + { + Vector3 toCenter = Vector3.ProjectOnPlane(areaCenter - transform.position, Vector3.up); + if (toCenter.magnitude > areaRadius) + { + Vector3 local = transform.InverseTransformDirection(toCenter.normalized); + return new Vector2(local.x, local.z).normalized; + } + + return new Vector2(UnityEngine.Random.value < 0.5f ? -1f : 1f, 0f); + } +} diff --git a/Assets/Stript/InGame/Bot/BotBrain.cs.meta b/Assets/Stript/InGame/Bot/BotBrain.cs.meta new file mode 100644 index 0000000..ad41d70 --- /dev/null +++ b/Assets/Stript/InGame/Bot/BotBrain.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bfef044fbd098624a8fcf6725e922a34 \ No newline at end of file diff --git a/Assets/Stript/InGame/Bot/BotHealth.cs b/Assets/Stript/InGame/Bot/BotHealth.cs new file mode 100644 index 0000000..a2f079e --- /dev/null +++ b/Assets/Stript/InGame/Bot/BotHealth.cs @@ -0,0 +1,64 @@ +using System; +using UnityEngine; +using CharacterMovement; + +// 機器人的血量 : 掛在機器人根物件上 +public class BotHealth : MonoBehaviour +{ + [Header("血量")] + public float maxHealth = 500f; + + [Header("死亡")] + [Tooltip("機器人模型上的 Animator,死亡時觸發 Die")] + public Animator animator; + + [Tooltip("倒下後多久移除 (秒)")] + public float destroyDelay = 3f; + + public float Health { get; private set; } + public bool IsDead { get; private set; } + + // 給 BotSpawner 用 : 倒下時通知,準備重生下一隻 + public event Action Died; + + void Awake() + { + Health = maxHealth; + } + + public void TakeDamage(float amount, BodyPart part) + { + if (IsDead) return; + + Health = Mathf.Max(0f, Health - amount); + if (Health <= 0f) + { + Die(); + } + } + + void Die() + { + IsDead = true; + + // 停止移動與 AI + if (TryGetComponent(out BotBrain brain)) brain.enabled = false; + if (TryGetComponent(out PlayerController controller)) controller.enabled = false; + if (TryGetComponent(out Rigidbody body)) + { + body.linearVelocity = Vector3.zero; + body.isKinematic = true; + } + + // 關掉命中框,倒下的機器人不會擋子彈 + foreach (Hitbox hitbox in GetComponentsInChildren()) + { + if (hitbox.TryGetComponent(out Collider col)) col.enabled = false; + } + + if (animator != null) animator.SetTrigger("Die"); + + Died?.Invoke(this); + Destroy(gameObject, destroyDelay); + } +} diff --git a/Assets/Stript/InGame/Bot/BotHealth.cs.meta b/Assets/Stript/InGame/Bot/BotHealth.cs.meta new file mode 100644 index 0000000..8319a70 --- /dev/null +++ b/Assets/Stript/InGame/Bot/BotHealth.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 451ce8b34d8695641b90837ce06f78d1 \ No newline at end of file diff --git a/Assets/Stript/InGame/Bot/BotSpawner.cs b/Assets/Stript/InGame/Bot/BotSpawner.cs new file mode 100644 index 0000000..e274702 --- /dev/null +++ b/Assets/Stript/InGame/Bot/BotSpawner.cs @@ -0,0 +1,83 @@ +using System.Collections; +using UnityEngine; + +// 一次只有一隻機器人,倒下後在隨機位置重生下一隻 +// 掛在場景裡的空物件上,物件的位置就是生成範圍的中心 +public class BotSpawner : MonoBehaviour +{ + [Header("參照")] + [Tooltip("機器人 prefab (要有 BotBrain、BotHealth)")] + public BotBrain botPrefab; + + [Tooltip("玩家 (機器人會面向它)")] + public Transform player; + + [Header("生成範圍")] + [Tooltip("以這個物件為中心的半徑 (m),要比場地小,避免生成在牆裡")] + public float spawnRadius = 15f; + + [Tooltip("離玩家的最小距離 (m)")] + public float minDistanceFromPlayer = 8f; + + [Header("重生")] + [Tooltip("倒下後多久生成下一隻 (秒)")] + public float respawnDelay = 1.5f; + + void Start() + { + Spawn(); + } + + void Spawn() + { + if (botPrefab == null) return; + + BotBrain bot = Instantiate(botPrefab, PickSpawnPoint(), Quaternion.identity); + bot.target = player; + bot.areaCenter = transform.position; + bot.areaRadius = spawnRadius; + + if (bot.TryGetComponent(out BotHealth health)) + { + health.Died += OnBotDied; + } + } + + void OnBotDied(BotHealth bot) + { + bot.Died -= OnBotDied; + StartCoroutine(RespawnAfterDelay()); + } + + IEnumerator RespawnAfterDelay() + { + yield return new WaitForSeconds(respawnDelay); + Spawn(); + } + + // 在範圍內隨機選點,盡量離玩家遠一點 ; 試幾次都太近就用最後一次的結果 + Vector3 PickSpawnPoint() + { + Vector3 point = transform.position; + + for (int i = 0; i < 20; i++) + { + Vector2 offset = Random.insideUnitCircle * spawnRadius; + point = transform.position + new Vector3(offset.x, 0f, offset.y); + + if (player == null || Vector3.Distance(point, player.position) >= minDistanceFromPlayer) + { + break; + } + } + + return point; + } + + // 在 Scene 視窗畫出生成範圍,方便調整 + void OnDrawGizmosSelected() + { + Gizmos.color = Color.yellow; + Gizmos.DrawWireSphere(transform.position, spawnRadius); + } +} diff --git a/Assets/Stript/InGame/Bot/BotSpawner.cs.meta b/Assets/Stript/InGame/Bot/BotSpawner.cs.meta new file mode 100644 index 0000000..3a7a170 --- /dev/null +++ b/Assets/Stript/InGame/Bot/BotSpawner.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ffa4aa80237c6424cbefd7a1db794702 \ No newline at end of file diff --git a/Assets/Stript/InGame/Bot/Hitbox.cs b/Assets/Stript/InGame/Bot/Hitbox.cs new file mode 100644 index 0000000..3bdbe26 --- /dev/null +++ b/Assets/Stript/InGame/Bot/Hitbox.cs @@ -0,0 +1,43 @@ +using UnityEngine; + +public enum BodyPart +{ + Head, + Body, + Leg +} + +// 掛在機器人骨頭上的命中框 (Collider 要勾 Is Trigger) +public class Hitbox : MonoBehaviour +{ + [Header("部位")] + public BodyPart part = BodyPart.Body; + + private BotHealth owner; + + void Awake() + { + owner = GetComponentInParent(); + } + + // 部位傷害倍率 : 頭 ×1.5、身體 ×1、腿 ×0.7 + public static float GetMultiplier(BodyPart part) + { + switch (part) + { + case BodyPart.Head: return 1.5f; + case BodyPart.Leg: return 0.7f; + default: return 1f; + } + } + + // 回傳實際造成的傷害 (機器人已經倒下就回傳 0) + public float Hit(float baseDamage) + { + if (owner == null || owner.IsDead) return 0f; + + float damage = baseDamage * GetMultiplier(part); + owner.TakeDamage(damage, part); + return damage; + } +} diff --git a/Assets/Stript/InGame/Bot/Hitbox.cs.meta b/Assets/Stript/InGame/Bot/Hitbox.cs.meta new file mode 100644 index 0000000..a79d955 --- /dev/null +++ b/Assets/Stript/InGame/Bot/Hitbox.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a53cad675bcc11640ae35481c28700e7 \ No newline at end of file diff --git a/Assets/Stript/InGame/PlayerLook.cs b/Assets/Stript/InGame/PlayerLook.cs index c3e3bea..aa47c2d 100644 --- a/Assets/Stript/InGame/PlayerLook.cs +++ b/Assets/Stript/InGame/PlayerLook.cs @@ -47,6 +47,24 @@ public class PlayerLook : MonoBehaviour pendingAssistDelta += delta; } + // ===== 後座力 ===== + // 後座力是疊在滑鼠視角上的一層獨立偏移 (度),不會改到 yaw / pitch,停火後自己回正 + // x = 往右,y = 往上 ; 記錄器之後可以把它和滑鼠輸入分開存 + public Vector2 RecoilOffset { get; private set; } + + private float recoilRecoverDelay; + private float recoilRecoverSpeed; + private float timeSinceRecoil; + + // recoverDelay : 最後一發後多久開始回正 (秒) ; recoverSpeed : 回正速度 (度/秒) + public void AddRecoil(Vector2 kick, float recoverDelay, float recoverSpeed) + { + RecoilOffset += kick; + recoilRecoverDelay = recoverDelay; + recoilRecoverSpeed = recoverSpeed; + timeSinceRecoil = 0f; + } + // ============================= void Start() @@ -77,7 +95,11 @@ public class PlayerLook : MonoBehaviour pitch -= totalDelta.y * degreesPerCount; // 滑鼠往上 = 抬頭 pitch = Mathf.Clamp(pitch, -maxPitch, maxPitch); - transform.rotation = Quaternion.Euler(pitch, yaw, 0f); + UpdateRecoilRecovery(); + + // 最終視角 = 滑鼠 (含輔助) 的角度 + 後座力偏移 + float viewPitch = Mathf.Clamp(pitch - RecoilOffset.y, -maxPitch, maxPitch); + transform.rotation = Quaternion.Euler(viewPitch, yaw + RecoilOffset.x, 0f); UpdateEyeHeight(); @@ -88,6 +110,16 @@ public class PlayerLook : MonoBehaviour } } + void UpdateRecoilRecovery() + { + if (RecoilOffset == Vector2.zero) return; + + timeSinceRecoil += Time.deltaTime; + if (timeSinceRecoil < recoilRecoverDelay) return; + + RecoilOffset = Vector2.MoveTowards(RecoilOffset, Vector2.zero, recoilRecoverSpeed * Time.deltaTime); + } + void UpdateEyeHeight() { if (bodyCapsule == null) return; diff --git a/Assets/Stript/InGame/Weapon.meta b/Assets/Stript/InGame/Weapon.meta new file mode 100644 index 0000000..b0e7b0f --- /dev/null +++ b/Assets/Stript/InGame/Weapon.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5e3a5f1477677c14eb5284511f5e2a67 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Stript/InGame/Weapon/HitscanWeapon.cs b/Assets/Stript/InGame/Weapon/HitscanWeapon.cs new file mode 100644 index 0000000..50900b4 --- /dev/null +++ b/Assets/Stript/InGame/Weapon/HitscanWeapon.cs @@ -0,0 +1,211 @@ +using System; +using UnityEngine; +using UnityEngine.InputSystem; + +// 掛在每把槍的模型物件上 (Main Camera 底下),一把槍一個,由 WeaponLoadout 決定啟用哪一把 +// 負責 : 開火、命中判定、彈匣與換彈、後座力、槍模型往後彈的畫面效果 +public class HitscanWeapon : MonoBehaviour +{ + [Header("數值")] + public WeaponData data; + + [Header("參照")] + [Tooltip("Main Camera,子彈從畫面中心射出")] + public Camera aimCamera; + + [Tooltip("CameraRoot 上的 PlayerLook,後座力加在這裡")] + public PlayerLook playerLook; + + [Tooltip("Player 根物件,射擊時略過自己的碰撞體")] + public Transform playerRoot; + + [Header("槍口火光 (可不填)")] + public GameObject muzzleFlashPrefab; + public Transform muzzlePoint; + + // 給 HUD / 之後的記錄器用 + public int Ammo { get; private set; } + public bool IsReloading => reloadEndTime > 0f; + public int RecoilSeed { get; private set; } // 後座力隨機部分的種子,記錄下來就能重現 + + public event Action Fired; + public event Action HitLanded; // 部位、實際傷害 + + private float nextFireTime; + private float lastShotTime = -999f; + private float reloadEndTime; + private int sprayIndex; // 這次連射的第幾發 (1 開始) + private System.Random recoilRandom; + private Vector3 restLocalPosition; + private readonly RaycastHit[] hitBuffer = new RaycastHit[32]; + + void Awake() + { + restLocalPosition = transform.localPosition; + Ammo = data != null ? data.magazineSize : 0; + + RecoilSeed = Environment.TickCount; + recoilRandom = new System.Random(RecoilSeed); + } + + void OnDisable() + { + // 切槍時取消換彈,模型回到原位 + reloadEndTime = 0f; + transform.localPosition = restLocalPosition; + } + + void Update() + { + if (data == null) return; + + UpdateReload(); + UpdateModelKick(); + + // 選單開著 (滑鼠沒鎖定) 時不能開槍 + if (Cursor.lockState != CursorLockMode.Locked || Mouse.current == null) return; + + if (Keyboard.current != null && Keyboard.current.rKey.wasPressedThisFrame) + { + StartReload(); + } + + bool trigger = data.fullAuto + ? Mouse.current.leftButton.isPressed + : Mouse.current.leftButton.wasPressedThisFrame; + + if (trigger && !IsReloading && Time.time >= nextFireTime) + { + if (Ammo > 0) + { + Fire(); + } + else + { + StartReload(); // 沒子彈時扣板機自動換彈 + } + } + } + + void Fire() + { + Ammo--; + + // 連射時從上一發的時間往後排,不受幀率影響 (否則低幀率時 Uzi 會射得比設定慢) + nextFireTime = Time.time - nextFireTime < data.fireInterval + ? nextFireTime + data.fireInterval + : Time.time + data.fireInterval; + + // 隔太久沒開槍就算新的一次連射,後座力圖案從頭開始 + if (Time.time - lastShotTime > data.fireInterval + data.recoverDelay) + { + sprayIndex = 0; + } + sprayIndex++; + lastShotTime = Time.time; + + // 先射擊再加後座力 : 這一發打在準心上,後座力影響的是下一發 + for (int i = 0; i < Mathf.Max(1, data.pellets); i++) + { + ShootRay(GetPelletDirection(i)); + } + + if (playerLook != null) + { + playerLook.AddRecoil(GetRecoilKick(sprayIndex), data.recoverDelay, data.recoverSpeed); + } + + transform.localPosition = restLocalPosition - Vector3.forward * data.modelKickBack; + + if (muzzleFlashPrefab != null && muzzlePoint != null) + { + Destroy(Instantiate(muzzleFlashPrefab, muzzlePoint.position, muzzlePoint.rotation, muzzlePoint), 0.05f); + } + + Fired?.Invoke(); + } + + // 霰彈的固定圖案 : 第 0 顆在正中間,其餘平均排在散布半徑的圓上 + Vector3 GetPelletDirection(int index) + { + Transform cam = aimCamera.transform; + if (data.pellets <= 1 || index == 0 || data.pelletSpread <= 0f) + { + return cam.forward; + } + + float angle = (index - 1) * 360f / (data.pellets - 1); + Quaternion around = Quaternion.AngleAxis(angle, cam.forward); + Quaternion tilt = Quaternion.AngleAxis(data.pelletSpread, cam.up); + return around * tilt * cam.forward; + } + + // 第 n 發的後座力 (度) : x = 往右,y = 往上 + Vector2 GetRecoilKick(int n) + { + float vertical = n <= data.verticalFirstShots ? data.verticalFirst : data.verticalAfter; + + float horizontal = 0f; + if (n >= data.horizontalRightFrom && n < data.horizontalLeftFrom) horizontal = data.horizontalStep; + else if (n >= data.horizontalLeftFrom && n <= data.horizontalEndAt) horizontal = -data.horizontalStep; + + if (data.horizontalRandom > 0f) + { + horizontal += ((float)recoilRandom.NextDouble() * 2f - 1f) * data.horizontalRandom; + } + + return new Vector2(horizontal, vertical); + } + + // 依距離由近到遠檢查 : 自己 → 略過 ; 命中框 → 命中 ; 機器人的移動膠囊 → 略過 ; 其他 (牆) → 擋住 + void ShootRay(Vector3 direction) + { + Vector3 origin = aimCamera.transform.position; + int count = Physics.RaycastNonAlloc(origin, direction, hitBuffer, data.range, ~0, QueryTriggerInteraction.Collide); + Array.Sort(hitBuffer, 0, count, HitDistanceComparer.Instance); + + for (int i = 0; i < count; i++) + { + Collider col = hitBuffer[i].collider; + + if (playerRoot != null && col.transform.IsChildOf(playerRoot)) continue; + + if (col.TryGetComponent(out Hitbox hitbox)) + { + float dealt = hitbox.Hit(data.damage); + if (dealt > 0f) HitLanded?.Invoke(hitbox.part, dealt); + return; + } + + if (col.isTrigger || col.GetComponentInParent() != null) continue; + + return; // 被牆或其他東西擋住 + } + } + + void StartReload() + { + if (IsReloading || Ammo >= data.magazineSize) return; + reloadEndTime = Time.time + data.reloadTime; + } + + void UpdateReload() + { + if (IsReloading && Time.time >= reloadEndTime) + { + reloadEndTime = 0f; + Ammo = data.magazineSize; + } + } + + void UpdateModelKick() + { + transform.localPosition = Vector3.Lerp(transform.localPosition, restLocalPosition, 1f - Mathf.Exp(-20f * Time.deltaTime)); + } + + private class HitDistanceComparer : System.Collections.Generic.IComparer + { + public static readonly HitDistanceComparer Instance = new HitDistanceComparer(); + public int Compare(RaycastHit a, RaycastHit b) => a.distance.CompareTo(b.distance); + } +} diff --git a/Assets/Stript/InGame/Weapon/HitscanWeapon.cs.meta b/Assets/Stript/InGame/Weapon/HitscanWeapon.cs.meta new file mode 100644 index 0000000..8222f88 --- /dev/null +++ b/Assets/Stript/InGame/Weapon/HitscanWeapon.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 86c6b5cad2146e242a41f45e2e6eedfc \ No newline at end of file diff --git a/Assets/Stript/InGame/Weapon/WeaponData.cs b/Assets/Stript/InGame/Weapon/WeaponData.cs new file mode 100644 index 0000000..1645496 --- /dev/null +++ b/Assets/Stript/InGame/Weapon/WeaponData.cs @@ -0,0 +1,71 @@ +using UnityEngine; + +// 一把槍的數值,一把槍一份資產 +// 建立方式 : Project 視窗右鍵 → Create → Mouse Trail Collector → Weapon Data +[CreateAssetMenu(menuName = "Mouse Trail Collector/Weapon Data", fileName = "WeaponData")] +public class WeaponData : ScriptableObject +{ + [Header("基本")] + [Tooltip("要和 StartUI 存的武器名稱一致 : M1911 / AK74 / Uzi / Benelli_M4")] + public string weaponName = "M1911"; + + [Tooltip("勾選 = 全自動 (按住連發),不勾 = 半自動 (點一下一發)")] + public bool fullAuto = false; + + [Header("傷害")] + [Tooltip("每顆彈丸打身體的傷害,頭 ×1.5、腿 ×0.7")] + public float damage = 50f; + + [Tooltip("每發的彈丸數,霰彈槍才會大於 1")] + public int pellets = 1; + + [Tooltip("霰彈的散布半徑 (度),彈丸排成固定圖案 : 中間 1 顆,其餘平均排在這個半徑的圓上")] + public float pelletSpread = 0f; + + [Tooltip("射程 (m)")] + public float range = 200f; + + [Header("射速與彈匣")] + [Tooltip("兩發之間的最短間隔 (秒)")] + public float fireInterval = 0.143f; + + public int magazineSize = 12; + + [Tooltip("換彈時間 (秒)")] + public float reloadTime = 1.2f; + + [Header("後座力 : 垂直 (度/發,往上)")] + [Tooltip("連射的前幾發")] + public int verticalFirstShots = 5; + public float verticalFirst = 0f; + + [Tooltip("之後的每一發")] + public float verticalAfter = 0f; + + [Header("後座力 : 水平 S 形 (度/發)")] + [Tooltip("每發往左或往右的固定量")] + public float horizontalStep = 0f; + + [Tooltip("第幾發開始往右 (含)")] + public int horizontalRightFrom = 6; + + [Tooltip("第幾發開始改往左 (含)")] + public int horizontalLeftFrom = 16; + + [Tooltip("第幾發之後就不再左右飄")] + public int horizontalEndAt = 25; + + [Tooltip("每發額外加上的隨機左右量 (± 度)")] + public float horizontalRandom = 0f; + + [Header("後座力 : 回正")] + [Tooltip("最後一發後多久開始回正 (秒)")] + public float recoverDelay = 0.15f; + + [Tooltip("回正速度 (度/秒)")] + public float recoverSpeed = 10f; + + [Header("畫面效果 (不影響準心)")] + [Tooltip("開槍時槍模型往後退的距離 (m)")] + public float modelKickBack = 0.03f; +} diff --git a/Assets/Stript/InGame/Weapon/WeaponData.cs.meta b/Assets/Stript/InGame/Weapon/WeaponData.cs.meta new file mode 100644 index 0000000..d945c9e --- /dev/null +++ b/Assets/Stript/InGame/Weapon/WeaponData.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 034e069ed5f7d6d4ba3d9e64bb0f44e8 \ No newline at end of file diff --git a/Assets/Stript/InGame/Weapon/WeaponHUD.cs b/Assets/Stript/InGame/Weapon/WeaponHUD.cs new file mode 100644 index 0000000..bbdf5e8 --- /dev/null +++ b/Assets/Stript/InGame/Weapon/WeaponHUD.cs @@ -0,0 +1,84 @@ +using UnityEngine; +using UnityEngine.UI; +using TMPro; + +// 命中提示與彈藥顯示 (準心本身只是畫面正中間的一張 Image,不需要腳本) +public class WeaponHUD : MonoBehaviour +{ + [Header("參照")] + public WeaponLoadout loadout; + + [Tooltip("命中提示的 Image (平常隱藏,命中時閃一下)")] + public Image hitMarker; + + [Tooltip("彈藥 Text (TMP),例如「12 / 12」")] + public TextMeshProUGUI ammoText; + + [Header("命中提示")] + public Color bodyColor = Color.white; + public Color headColor = new Color(1f, 0.25f, 0.25f); + + [Tooltip("顯示時間 (秒)")] + public float hitMarkerTime = 0.1f; + + private HitscanWeapon subscribed; + private float hitMarkerTimer; + private int shownAmmo = -1; + private bool shownReloading; + + void Start() + { + if (hitMarker != null) hitMarker.enabled = false; + } + + void OnDisable() + { + Subscribe(null); + } + + void Update() + { + // 切槍時改聽新的那一把 + HitscanWeapon current = loadout != null ? loadout.Current : null; + if (current != subscribed) Subscribe(current); + + UpdateHitMarker(); + UpdateAmmoText(current); + } + + void Subscribe(HitscanWeapon weapon) + { + if (subscribed != null) subscribed.HitLanded -= OnHitLanded; + subscribed = weapon; + if (subscribed != null) subscribed.HitLanded += OnHitLanded; + shownAmmo = -1; // 強制更新彈藥文字 + } + + void OnHitLanded(BodyPart part, float damage) + { + if (hitMarker == null) return; + + hitMarker.color = part == BodyPart.Head ? headColor : bodyColor; + hitMarker.enabled = true; + hitMarkerTimer = hitMarkerTime; + } + + void UpdateHitMarker() + { + if (hitMarkerTimer <= 0f) return; + + hitMarkerTimer -= Time.deltaTime; + if (hitMarkerTimer <= 0f && hitMarker != null) hitMarker.enabled = false; + } + + // 數字有變才重設文字,避免每幀重建 TMP + void UpdateAmmoText(HitscanWeapon weapon) + { + if (ammoText == null || weapon == null || weapon.data == null) return; + if (weapon.Ammo == shownAmmo && weapon.IsReloading == shownReloading) return; + + shownAmmo = weapon.Ammo; + shownReloading = weapon.IsReloading; + ammoText.text = shownReloading ? "換彈中..." : $"{shownAmmo} / {weapon.data.magazineSize}"; + } +} diff --git a/Assets/Stript/InGame/Weapon/WeaponHUD.cs.meta b/Assets/Stript/InGame/Weapon/WeaponHUD.cs.meta new file mode 100644 index 0000000..4aeac74 --- /dev/null +++ b/Assets/Stript/InGame/Weapon/WeaponHUD.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5f5da41ae4773f7419675bd3ff836b02 \ No newline at end of file diff --git a/Assets/Stript/InGame/Weapon/WeaponLoadout.cs b/Assets/Stript/InGame/Weapon/WeaponLoadout.cs new file mode 100644 index 0000000..3d3caf2 --- /dev/null +++ b/Assets/Stript/InGame/Weapon/WeaponLoadout.cs @@ -0,0 +1,55 @@ +using UnityEngine; +using UnityEngine.InputSystem; + +// 依照 StartUI 選的武器,只啟用對應的那一把槍 +// 測試模式下可以用 1~4 鍵切換,方便比較手感 +public class WeaponLoadout : MonoBehaviour +{ + [Header("武器 (順序對應 1~4 鍵)")] + [Tooltip("每把槍模型上的 HitscanWeapon")] + public HitscanWeapon[] weapons; + + public HitscanWeapon Current { get; private set; } + + private bool allowSwitch; + + void Start() + { + GameSettings settings = GameSettings.Load(); + allowSwitch = settings.isTest; + + int index = 0; + for (int i = 0; i < weapons.Length; i++) + { + if (weapons[i] != null && weapons[i].data != null && weapons[i].data.weaponName == settings.weapon) + { + index = i; + break; + } + } + + Equip(index); + } + + void Update() + { + if (!allowSwitch || Keyboard.current == null) return; + + if (Keyboard.current.digit1Key.wasPressedThisFrame) Equip(0); + else if (Keyboard.current.digit2Key.wasPressedThisFrame) Equip(1); + else if (Keyboard.current.digit3Key.wasPressedThisFrame) Equip(2); + else if (Keyboard.current.digit4Key.wasPressedThisFrame) Equip(3); + } + + void Equip(int index) + { + if (index < 0 || index >= weapons.Length || weapons[index] == null) return; + + for (int i = 0; i < weapons.Length; i++) + { + if (weapons[i] != null) weapons[i].gameObject.SetActive(i == index); + } + + Current = weapons[index]; + } +} diff --git a/Assets/Stript/InGame/Weapon/WeaponLoadout.cs.meta b/Assets/Stript/InGame/Weapon/WeaponLoadout.cs.meta new file mode 100644 index 0000000..7b4c9df --- /dev/null +++ b/Assets/Stript/InGame/Weapon/WeaponLoadout.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c9a11a2deaee4fe498a75ccc7ce89ee7 \ No newline at end of file