Driving UI
This commit is contained in:
@@ -4,29 +4,28 @@ using UnityEngine;
|
||||
|
||||
public class LapTimer : MonoBehaviour
|
||||
{
|
||||
public float time = 0;
|
||||
private bool startTime = false;
|
||||
// public List<float> times;
|
||||
// private bool startTime = false;
|
||||
|
||||
|
||||
private void OnTriggerEnter(Collider other) {
|
||||
// private void OnTriggerEnter(Collider other) {
|
||||
|
||||
if (startTime)
|
||||
{
|
||||
startTime = false;
|
||||
print(time);
|
||||
} else {
|
||||
startTime = true;
|
||||
time=0;
|
||||
}
|
||||
// if (startTime)
|
||||
// {
|
||||
// startTime = false;
|
||||
// print(time);
|
||||
// } else {
|
||||
// startTime = true;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
void FixedUpdate()
|
||||
{
|
||||
// void FixedUpdate()
|
||||
// {
|
||||
|
||||
time +=1;
|
||||
// time +=1;
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user