sounds and screens with improved matchmaker

This commit is contained in:
2026-04-05 00:08:52 +05:30
parent ef89a7320a
commit 352693c860
38 changed files with 6044 additions and 2270 deletions
+10 -1
View File
@@ -130,8 +130,17 @@ public class Puck : NetworkBehaviour
Debug.Log("Puck collision speed: " + otherSpeed);
float maxVolSpeed =5f;
float vol = Mathf.Clamp(otherSpeed / maxVolSpeed,0.1f,1);
if (AudioManager.instance != null)
if (AudioManager.instance != null){
AudioManager.instance.PlayPuckHit(vol);
if(isServer){
RpcPuckHitAudio(vol);
}
}
}
[ClientRpc]
void RpcPuckHitAudio(float vol){
AudioManager.instance.PlayPuckHit(vol);
}
public void Reset(Vector3? position = null, float duration = 0.5f)