Golf2D/Assets/Scripts/GolfBall.cs
2023-02-16 22:47:03 +05:30

12 lines
279 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);
}
}