Golf2D/Assets/Scripts/GolfBall.cs
2023-05-20 13:49:50 +05:30

12 lines
290 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Collider2D))]
public class GolfBall : MonoBehaviour
{
void OnCollisionEnter2D(Collision2D other){
AudioManager.DropSfx(other.relativeVelocity.magnitude);
}
}