|
@@ -2,12 +2,15 @@
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
using Pools;
|
|
|
+using Study;
|
|
|
|
|
|
|
|
|
|
|
|
public class CoinUpdate : MonoBehaviour
|
|
|
{
|
|
|
+ public int routeId = 9;
|
|
|
private CoinCreation coinCreator;
|
|
|
+
|
|
|
|
|
|
|
|
|
void Start()
|
|
@@ -20,7 +23,12 @@ public class CoinUpdate : MonoBehaviour
|
|
|
{
|
|
|
if (other.gameObject.CompareTag("bike"))
|
|
|
{
|
|
|
- coinCreator.PlaceCoins();
|
|
|
+ var cm = GameObject.Find("ExperimentManager").GetComponent<ConditionManager>();
|
|
|
+ int routeNbr = cm.GetRouteNumber();
|
|
|
+ if (routeId == routeNbr)
|
|
|
+ {
|
|
|
+ coinCreator.PlaceCoins();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|