diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-06-12 23:26:00 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-06-12 23:26:00 -0400 |
commit | da7b51461ae4c6452095a42c5fe2f5b4af09da16 (patch) | |
tree | a9602c7b42f94e9085212b74b8d4ee9f32b6b9d7 | |
parent | 12be3c7b6336601170124dbcb8322b2d5e81fc42 (diff) | |
download | gmtk-gamejam-da7b51461ae4c6452095a42c5fe2f5b4af09da16.tar.gz gmtk-gamejam-da7b51461ae4c6452095a42c5fe2f5b4af09da16.tar.zst gmtk-gamejam-da7b51461ae4c6452095a42c5fe2f5b4af09da16.zip |
Add crowd cheer on goal 2
-rw-r--r-- | Assets/Scripts/Controllers/Hoop.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Assets/Scripts/Controllers/Hoop.cs b/Assets/Scripts/Controllers/Hoop.cs index 39c7a6f..7e924e7 100644 --- a/Assets/Scripts/Controllers/Hoop.cs +++ b/Assets/Scripts/Controllers/Hoop.cs @@ -4,6 +4,7 @@ using UnityEngine; namespace Controllers { [RequireComponent(typeof(AudioSource))] + [RequireComponent(typeof(AudioSource))] public class Hoop : MonoBehaviour { internal GameController controller; @@ -11,6 +12,7 @@ namespace Controllers [SerializeField] private BoxCollider2D Rim; [SerializeField] private BoxCollider2D Net; [SerializeField] private AudioSource shotSound; + [SerializeField] private AudioSource crowdSound; private Animator HoopAnimator; @@ -28,6 +30,7 @@ namespace Controllers controller.player.Score(Rim.transform.position); else if (this == controller.EnemyHoop) controller.enemy.Score(Rim.transform.position); + crowdSound.Play(); } } } |