mirror of
https://projects.caleb-brown.dev/UDRI-XRT/UDRIGEEKCup2024.git
synced 2025-01-21 22:58:50 -05:00
reset variables and changed scene reloader to use string
This commit is contained in:
parent
a67e679f2c
commit
c2b607572f
@ -21,6 +21,8 @@ namespace GolfControls
|
||||
private void Start()
|
||||
{
|
||||
body = gameObject.GetComponent<Rigidbody>();
|
||||
inHoleVariable.SetValue(false);
|
||||
isMovingVariable.SetValue(false);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
|
@ -10,6 +10,12 @@ namespace GolfControls
|
||||
public IntVariable StrokeVariable;
|
||||
public VoidEvent HitEvent;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
StrokeVariable.SetValue(0);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
HitEvent.Register(OnHit);
|
||||
|
@ -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
|
||||
|
@ -5,8 +5,11 @@ using UnityEngine.SceneManagement;
|
||||
|
||||
public class SceneReloader : MonoBehaviour
|
||||
{
|
||||
|
||||
public string startingSceneName;
|
||||
|
||||
public void Reload()
|
||||
{
|
||||
SceneManager.LoadScene(0);
|
||||
SceneManager.LoadScene(startingSceneName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user