TheStable/Assets/Horseshoes/Scripts/HorseshoesGameManager.cs
Jamie Greunbaum e023f15f48 - Added a score display to horseshoes that enables after they have been thrown.
- Added material colour changes to horseshoes to differentiate players' shoes.
- Simplified collision on stable stools and buckets.
2026-02-25 15:41:08 -05:00

37 lines
789 B
C#

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class HorseshoesGameManager : UdonSharpBehaviour
{
private const float IN_COUNT_DISTANCE = (0.0254f * 6);
private const int RINGER_POINT_VALUE = 3;
public void CalculatePoints(PlayerHorseshoe Shoe, float DistanceFromStake)
{
if (DistanceFromStake <= IN_COUNT_DISTANCE)
{
Shoe.ScoreDisplayText.text = "+1";
Debug.Log("[HorseshoesGameManager] Horseshoe is in count");
}
else
{
Shoe.ScoreDisplayText.text = "+0";
Debug.Log("[HorseshoesGameManager] Horseshoe is not in play");
}
}
public void CalculateRinger(PlayerHorseshoe Shoe)
{
Shoe.ScoreDisplayText.text = "+3";
Debug.Log("[HorseshoesGameManager] Ringer!");
}
}