|
@@ -19,8 +19,8 @@ namespace Routes
|
|
|
{
|
|
|
for (var i = 0; i < routes.Length; i++) routes[i].gameObject.SetActive(i == selectedRoute);
|
|
|
|
|
|
- routes[selectedRoute].OnStartEntered += OnOnStartEntered;
|
|
|
- routes[selectedRoute].OnFinishPassed += OnOnFinishPassed;
|
|
|
+ routes[selectedRoute].OnStartEntered += OnStartEntered;
|
|
|
+ routes[selectedRoute].OnFinishPassed += OnFinishPassed;
|
|
|
|
|
|
PlaceBike();
|
|
|
}
|
|
@@ -30,7 +30,6 @@ namespace Routes
|
|
|
var firstTurnPos = routes[selectedRoute].items.First().turn.transform.position;
|
|
|
|
|
|
var startTransform = routes[selectedRoute].start.gameObject.transform;
|
|
|
- var startRotationEuler = startTransform.rotation.eulerAngles;
|
|
|
|
|
|
var difStartFirstTurn = firstTurnPos - startTransform.position;
|
|
|
var bikeDirection = Vector3.zero;
|
|
@@ -49,14 +48,14 @@ namespace Routes
|
|
|
bicycleGameObject.transform.LookAt(startTransform);
|
|
|
}
|
|
|
|
|
|
- private void OnOnFinishPassed()
|
|
|
+ private void OnFinishPassed()
|
|
|
{
|
|
|
//bicycle.enabled = false;
|
|
|
Instantiate(showOnFinish, bicycle.transform);
|
|
|
Destroy(logging.gameObject);
|
|
|
}
|
|
|
|
|
|
- private void OnOnStartEntered()
|
|
|
+ private void OnStartEntered()
|
|
|
{
|
|
|
logging.gameObject.SetActive(true);
|
|
|
}
|