sounds and screens with improved matchmaker
This commit is contained in:
+10
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user