Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound Effects For different impacts #43

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Assets/Audio/Dirt Impact.mp3
Binary file not shown.
23 changes: 23 additions & 0 deletions Assets/Audio/Dirt Impact.mp3.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Audio/Glass Impact.mp3
Binary file not shown.
23 changes: 23 additions & 0 deletions Assets/Audio/Glass Impact.mp3.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Audio/Metal Impact.mp3
Binary file not shown.
23 changes: 23 additions & 0 deletions Assets/Audio/Metal Impact.mp3.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Audio/Water Impact.mp3
Binary file not shown.
23 changes: 23 additions & 0 deletions Assets/Audio/Water Impact.mp3.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Audio/Wood Impact.mp3
Binary file not shown.
23 changes: 23 additions & 0 deletions Assets/Audio/Wood Impact.mp3.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Assets/Models/BulletImpacts/impactMetal.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/PolicemanController.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/RobotXController.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/RobotYController.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/impactBrick.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/impactConcrete.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/impactDirt.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/impactGlass.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/impactMetal.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/impactWater.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/Resources/impactWood.prefab
Binary file not shown.
18 changes: 18 additions & 0 deletions Assets/Scripts/ImpactAudioPlayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using UnityEngine;


[RequireComponent(typeof(AudioSource))]
public class ImpactAudioPlayer : MonoBehaviour
{
private AudioSource audioSource;
private void OnEnable()
{
audioSource = GetComponent<AudioSource>();
audioSource?.Play();
Debug.Log($"Playing with {audioSource}");
}
private void OnDisable()
{
audioSource?.Stop();
}
}
11 changes: 11 additions & 0 deletions Assets/Scripts/ImpactAudioPlayer.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.