|
@@ -42,6 +42,8 @@ public class CastingToObject : MonoBehaviour
|
|
|
private float time1 = 0.0f;
|
|
|
private float time2 = 0.0f;
|
|
|
|
|
|
+ private NavMeshModifier[] childs;
|
|
|
+
|
|
|
private void Start()
|
|
|
{
|
|
|
currentCam = cam1;
|
|
@@ -49,7 +51,7 @@ public class CastingToObject : MonoBehaviour
|
|
|
oldObject2 = new RaycastHit();
|
|
|
oldObject3 = new RaycastHit();
|
|
|
|
|
|
- var childs = marketStalls.GetComponentsInChildren<NavMeshModifier>();
|
|
|
+ childs = marketStalls.GetComponentsInChildren<NavMeshModifier>();
|
|
|
|
|
|
selectedMarketStalls = new List<int>[childs.Length][];
|
|
|
selectedMarketStallsTimes = new List<float>[childs.Length][];
|
|
@@ -103,6 +105,28 @@ public class CastingToObject : MonoBehaviour
|
|
|
selectedToggle = 3;
|
|
|
}
|
|
|
|
|
|
+ public void OnSubmitClicked()
|
|
|
+ {
|
|
|
+ selectedMarketStalls = new List<int>[childs.Length][];
|
|
|
+ selectedMarketStallsTimes = new List<float>[childs.Length][];
|
|
|
+ marketStallNames = new string[childs.Length];
|
|
|
+
|
|
|
+ for (int i = 0; i < childs.Length; i++)
|
|
|
+ {
|
|
|
+ selectedMarketStalls[i] = new List<int>[3];
|
|
|
+ selectedMarketStallsTimes[i] = new List<float>[3];
|
|
|
+ marketStallNames[i] = childs[i].transform.name;
|
|
|
+
|
|
|
+ for (int j = 0; j < selectedMarketStalls[i].Length; j++)
|
|
|
+ {
|
|
|
+ selectedMarketStalls[i][j] = new List<int>();
|
|
|
+ selectedMarketStalls[i][j].Add(0);
|
|
|
+ selectedMarketStallsTimes[i][j] = new List<float>(1);
|
|
|
+ selectedMarketStallsTimes[i][j].Add(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void HighlightMarketStalls()
|
|
|
{
|
|
|
for (int i = 0; i < selectedMarketStalls.Length; i++)
|