diff --git a/Assets/Prefabs/Ambiance.prefab b/Assets/Prefabs/Ambiance.prefab new file mode 100644 index 0000000..3b83083 --- /dev/null +++ b/Assets/Prefabs/Ambiance.prefab @@ -0,0 +1,130 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6406271711128597758 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 808831785093953574} + - component: {fileID: 4945767092616751961} + m_Layer: 0 + m_Name: Ambiance + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &808831785093953574 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6406271711128597758} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -74.2, y: 17.891605, z: 0.032423317} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &4945767092616751961 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6406271711128597758} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 diff --git a/Assets/Prefabs/Ambiance.prefab.meta b/Assets/Prefabs/Ambiance.prefab.meta new file mode 100644 index 0000000..39ac089 --- /dev/null +++ b/Assets/Prefabs/Ambiance.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0b9d694cefc9b6848acfaff4bed8cc65 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Music.prefab b/Assets/Prefabs/Music.prefab new file mode 100644 index 0000000..b62e3c2 --- /dev/null +++ b/Assets/Prefabs/Music.prefab @@ -0,0 +1,130 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8571589110344635516 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1418671164770919128} + - component: {fileID: 4094901255911055533} + m_Layer: 0 + m_Name: Music + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1418671164770919128 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8571589110344635516} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -74.2, y: 17.891605, z: 0.032423317} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &4094901255911055533 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8571589110344635516} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 0.436 + m_Pitch: 1 + Loop: 1 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 diff --git a/Assets/Prefabs/Music.prefab.meta b/Assets/Prefabs/Music.prefab.meta new file mode 100644 index 0000000..6209c37 --- /dev/null +++ b/Assets/Prefabs/Music.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 92a7b11ea4b35924a9caf2ab6d443449 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index 1ab7c67..84b6904 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -13,12 +13,14 @@ GameObject: - component: {fileID: 1772573266731274169} - component: {fileID: 1772573266731274174} - component: {fileID: 1772573266731274173} - - component: {fileID: 1772573266731274172} - component: {fileID: 1772573266731274163} - component: {fileID: 8474203461765366282} + - component: {fileID: 8078848171855759243} + - component: {fileID: 1772573266731274172} - component: {fileID: 1447597341752185403} - component: {fileID: 1211811550} - component: {fileID: 1211811541} + - component: {fileID: 2761483155973167578} m_Layer: 8 m_Name: Player m_TagString: Player @@ -108,7 +110,7 @@ Rigidbody: m_UseGravity: 1 m_IsKinematic: 0 m_Interpolate: 0 - m_Constraints: 8 + m_Constraints: 120 m_CollisionDetection: 2 --- !u!114 &1772573266731274173 MonoBehaviour: @@ -122,6 +124,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5f45bd04209bb424e8b1f5271cb16ab0, type: 3} m_Name: m_EditorClassIdentifier: + soundPlayer: {fileID: 8078848171855759243} maxGrappleDist: 15 grappleExtensionSpeed: 2.5 grappleStrength: 40 @@ -135,6 +138,59 @@ MonoBehaviour: gunPos: {fileID: 1772573266917019329} canvasRect: {fileID: 0} hitMarkerRect: {fileID: 0} +--- !u!114 &1772573266731274163 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1772573266731274171} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 60e46f6febb0d4a4592dd894365ffeb2, type: 3} + m_Name: + m_EditorClassIdentifier: + rb: {fileID: 1772573266731274174} + soundPlayer: {fileID: 8078848171855759243} + canWalk: 1 + canJump: 1 + movementSpeed: 0.8 + maxMovementSpeed: 28 + jumpPower: 3 + afterJumpHorizontalSlowdownTime: 1 + groundDrag: 1 + airDrag: 0 + playerHeight: 0.6 + jumpAirSlowdown: 80 + groundHitSoundVelocity: 24 + grappleHook: {fileID: 1772573266731274173} + isGrounded: 0 +--- !u!114 &8474203461765366282 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1772573266731274171} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b5fa9960655cb742880ef94db81ca9c, type: 3} + m_Name: + m_EditorClassIdentifier: + soundPlayer: {fileID: 8078848171855759243} +--- !u!114 &8078848171855759243 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1772573266731274171} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6fb36fee47a0d6a44bc2237dfbdac4d5, type: 3} + m_Name: + m_EditorClassIdentifier: + playableSounds: [] --- !u!114 &1772573266731274172 MonoBehaviour: m_ObjectHideFlags: 0 @@ -262,43 +318,6 @@ MonoBehaviour: m_DefaultActionMap: Player m_SplitScreenIndex: -1 m_Camera: {fileID: 0} ---- !u!114 &1772573266731274163 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1772573266731274171} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 60e46f6febb0d4a4592dd894365ffeb2, type: 3} - m_Name: - m_EditorClassIdentifier: - rb: {fileID: 1772573266731274174} - canWalk: 1 - canJump: 1 - movementSpeed: 0.8 - maxMovementSpeed: 30 - jumpPower: 3 - afterJumpHorizontalSlowdownTime: 1 - groundDrag: 1 - airDrag: 0 - playerHeight: 0.6 - jumpAirSlowdown: 80 - grappleHook: {fileID: 1772573266731274173} - isGrounded: 0 ---- !u!114 &8474203461765366282 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1772573266731274171} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9b5fa9960655cb742880ef94db81ca9c, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!136 &1447597341752185403 CapsuleCollider: m_ObjectHideFlags: 0 @@ -347,6 +366,102 @@ MonoBehaviour: m_EditorClassIdentifier: _startsRagdolled: 1 _hipBone: {fileID: 2527212996625801578} +--- !u!82 &2761483155973167578 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1772573266731274171} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!1 &1772573266864950258 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/LevelDesign.unity b/Assets/Scenes/LevelDesign.unity index 4001009..61658ba 100644 --- a/Assets/Scenes/LevelDesign.unity +++ b/Assets/Scenes/LevelDesign.unity @@ -2723,6 +2723,149 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0e12bf23a882b9d47b6b9b68e4e7a062, type: 3} +--- !u!1001 &893636036601257466 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_RootOrder + value: 22 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalPosition.x + value: -74.2 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalPosition.y + value: 17.891605 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalPosition.z + value: 0.032423317 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 808831785093953574, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6406271711128597758, guid: 0b9d694cefc9b6848acfaff4bed8cc65, + type: 3} + propertyPath: m_Name + value: Ambiance + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 0b9d694cefc9b6848acfaff4bed8cc65, type: 3} +--- !u!1001 &934850289875368483 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_RootOrder + value: 21 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalPosition.x + value: -74.2 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalPosition.y + value: 17.891605 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalPosition.z + value: 0.032423317 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1418671164770919128, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4094901255911055533, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_audioClip + value: + objectReference: {fileID: 8300000, guid: ca051ddfd9879bb4783087293eb7e5a4, type: 3} + - target: {fileID: 8571589110344635516, guid: 92a7b11ea4b35924a9caf2ab6d443449, + type: 3} + propertyPath: m_Name + value: Music + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 92a7b11ea4b35924a9caf2ab6d443449, type: 3} --- !u!1001 &1772573267671239019 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/CharacterMovement.cs b/Assets/Scripts/CharacterMovement.cs index 8244978..34560b5 100644 --- a/Assets/Scripts/CharacterMovement.cs +++ b/Assets/Scripts/CharacterMovement.cs @@ -2,10 +2,12 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; +using Bytes.Sound; public class CharacterMovement : MonoBehaviour { [SerializeField] private Rigidbody rb; + [SerializeField] private SoundPlayer soundPlayer; [Header("Enable switches")] [SerializeField] private bool canWalk; @@ -22,9 +24,11 @@ public class CharacterMovement : MonoBehaviour [SerializeField] private float airDrag; [SerializeField] private float playerHeight; [SerializeField] private float jumpAirSlowdown; + [SerializeField] private float groundHitSoundVelocity; [SerializeField] private GrappleHook grappleHook; public bool isGrounded; private bool isStunned = false; + private bool canHitGround = true; private Vector3 rawInputMovement; private float afterJumpHorizontalSlowdownTimeCounter; @@ -146,4 +150,21 @@ public class CharacterMovement : MonoBehaviour } } } + + private void OnCollisionEnter(Collision collision) + { + if(rb.velocity.magnitude>= groundHitSoundVelocity && canHitGround) + { + soundPlayer.PlaySound("PlayerGroudHit"); + StartCoroutine(DelayGroundHit(.2f)); + + } + } + + IEnumerator DelayGroundHit(float delay) + { + canHitGround = false; + yield return new WaitForSeconds(delay); + canHitGround = true; + } } diff --git a/Assets/Scripts/GrappleHook.cs b/Assets/Scripts/GrappleHook.cs index 90e1d34..732615b 100644 --- a/Assets/Scripts/GrappleHook.cs +++ b/Assets/Scripts/GrappleHook.cs @@ -3,9 +3,11 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.InputSystem; +using Bytes.Sound; public class GrappleHook : MonoBehaviour { + [SerializeField] SoundPlayer soundPlayer; [Header("Grapple settings")] [SerializeField] @@ -15,7 +17,7 @@ public class GrappleHook : MonoBehaviour [SerializeField] private float grappleStrength = 4.5f * 5f; [SerializeField] - private float grappleDamper = 7f; + private float grappleDamper = 7f; [SerializeField] private float grappleBoostSpeed = 50f; [SerializeField] @@ -120,6 +122,8 @@ public class GrappleHook : MonoBehaviour grappled = true; grappling = false; + soundPlayer.PlaySound("PlayerGrappleHit"); + //Display hitMarkerRect.gameObject.SetActive(false); @@ -150,6 +154,10 @@ public class GrappleHook : MonoBehaviour } private void EndGrapple(){ + if (grappled) + { + soundPlayer.PlaySound("PlayerGrappleDetach"); + } grappled = false; grappling = false; lr.enabled = false; @@ -195,14 +203,17 @@ public void Unhook(GameObject hookedObj){ if(grappling && grappled)return; if(context.performed){ grappling = true; - }else if(context.canceled){ + soundPlayer.PlaySound("PlayerGrappleFire"); + } + else if(context.canceled){ EndGrapple(); } } public void BoostToAnchor(InputAction.CallbackContext context){ - if(context.performed && grappled){ + if(context.performed && grappled && !boosted){ boosted = true; + soundPlayer.PlaySound("PlayerGrappleBoost"); } } diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index e44e3a7..aa4bf41 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -1,7 +1,6 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; - using Bytes.Sound; public class PlayerController : MonoBehaviour @@ -9,7 +8,7 @@ public class PlayerController : MonoBehaviour private GrappleHook grappleScript; private CharacterMovement movementScript; private Rigidbody rb; - SoundPlayer soundPlayer; + [SerializeField] SoundPlayer soundPlayer; // Start is called before the first frame update void Start() { @@ -32,6 +31,7 @@ public class PlayerController : MonoBehaviour } public void Knockback(Vector2 dir){ + soundPlayer.PlaySound("PlayerKnockback"); rb.AddForce(dir); } } diff --git a/Assets/Sounds.meta b/Assets/Sounds.meta new file mode 100644 index 0000000..eb25e14 --- /dev/null +++ b/Assets/Sounds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d1b6d3af796f834d862a9ba2cca6316 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sounds/Adventure-320bit.mp3 b/Assets/Sounds/Adventure-320bit.mp3 new file mode 100644 index 0000000..7b3d676 Binary files /dev/null and b/Assets/Sounds/Adventure-320bit.mp3 differ diff --git a/Assets/Sounds/Adventure-320bit.mp3.meta b/Assets/Sounds/Adventure-320bit.mp3.meta new file mode 100644 index 0000000..0f52e67 --- /dev/null +++ b/Assets/Sounds/Adventure-320bit.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ca051ddfd9879bb4783087293eb7e5a4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sounds/PerituneMaterial_Gothic_Cute_inst.mp3 b/Assets/Sounds/PerituneMaterial_Gothic_Cute_inst.mp3 new file mode 100644 index 0000000..511a665 Binary files /dev/null and b/Assets/Sounds/PerituneMaterial_Gothic_Cute_inst.mp3 differ diff --git a/Assets/Sounds/PerituneMaterial_Gothic_Cute_inst.mp3.meta b/Assets/Sounds/PerituneMaterial_Gothic_Cute_inst.mp3.meta new file mode 100644 index 0000000..332590a --- /dev/null +++ b/Assets/Sounds/PerituneMaterial_Gothic_Cute_inst.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7f8d6228f336a80488a93efc88764837 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: