1
0
mirror of https://projects.caleb-brown.dev/UDRI-XRT/UDRIGEEKCup2024.git synced 2025-01-22 07:08:51 -05:00

reset variables and changed scene reloader to use string

This commit is contained in:
Abraham 2024-04-16 09:36:59 -04:00
parent a67e679f2c
commit c2b607572f
4 changed files with 13 additions and 1 deletions

View File

@ -21,6 +21,8 @@ namespace GolfControls
private void Start()
{
body = gameObject.GetComponent<Rigidbody>();
inHoleVariable.SetValue(false);
isMovingVariable.SetValue(false);
}
private void OnEnable()

View File

@ -10,6 +10,12 @@ namespace GolfControls
public IntVariable StrokeVariable;
public VoidEvent HitEvent;
private void Start()
{
StrokeVariable.SetValue(0);
}
private void OnEnable()
{
HitEvent.Register(OnHit);

View File

@ -1834,6 +1834,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8c6bc963a512bff438769c9188ce8e3a, type: 3}
m_Name:
m_EditorClassIdentifier:
startingSceneName: TestControls
--- !u!4 &1028760416
Transform:
m_ObjectHideFlags: 0

View File

@ -5,8 +5,11 @@ using UnityEngine.SceneManagement;
public class SceneReloader : MonoBehaviour
{
public string startingSceneName;
public void Reload()
{
SceneManager.LoadScene(0);
SceneManager.LoadScene(startingSceneName);
}
}