Commit 9a1af6cf authored by Danial KordModanlou's avatar Danial KordModanlou

fixing some issues

parent 00bf3526
......@@ -83,6 +83,8 @@
<e p="TargetFollower.cs" t="Include" />
<e p="TargetFollowerV2.cs" t="Include" />
<e p="TerafficGraphManager.cs" t="Include" />
<e p="Wall.cs" t="Include" />
<e p="Warning.cs" t="Include" />
</e>
<e p="Standard Assets" t="Include">
<e p="CrossPlatformInput" t="Include">
......@@ -285,6 +287,11 @@
</e>
</e>
<e p="unity3d.txt" t="Include" />
<e p="warning model" t="Include">
<e p="2" t="Include">
<e p="thank you.txt" t="Include" />
</e>
</e>
</e>
<e p="car-sim-remaster.sln" t="IncludeFlat" />
<e p="obj" t="ExcludeRecursive" />
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
24.91738,-0.6712475,0.04501361,11.57083
24.84339,-0.8909111,0.04583055,12.25072
25.55014,-1.158697,0.0461359,12.92576
26.95042,-1.49778,0.0457418,13.62527
29.17599,-1.940498,0.0445447,14.37449
30.63966,-2.467073,0.04283142,15.11516
31.17857,-3.022049,0.0412575,15.77954
30.50716,-3.669786,0.04020041,16.44661
29.54325,-4.304037,0.04019964,17.00782
28.55794,-4.96105,0.04106647,17.50492
28.09871,-5.640465,0.04235005,17.93462
28.40702,-6.36528,0.04343915,18.30229
29.39918,-7.130337,0.04380304,18.59732
31.19436,-7.99485,0.04323286,18.82901
32.78734,-8.946846,0.04182076,18.97408
34.35923,-9.972157,0.04000753,19.0152
35.86755,-10.97885,0.03836077,18.9442
37.5542,-12.07964,0.03691959,18.73929
38.83241,-13.1156,0.03589666,18.41956
40.19015,-14.24146,0.03503472,17.91685
41.14674,-15.30832,0.0343287,17.26185
42.04109,-16.32552,0.0336743,16.43102
42.59159,-17.13657,0.03315353,15.5653
42.9703,-17.86224,0.03270543,14.55092
43.17999,-18.42267,0.03239751,13.48952
43.2245,-18.85715,0.03221834,12.28276
43.06847,-19.10231,0.03219408,11.06185
42.77328,-19.16042,0.03231752,9.748507
42.33674,-19.01614,0.03256619,8.491774
41.6481,-18.66722,0.03293705,7.266203
40.9904,-18.10866,0.03342426,6.094862
40.82294,-17.39435,0.03390747,5.075396
41.10178,-16.54071,0.03422236,4.180799
41.51036,-15.58485,0.03423923,3.423113
42.51158,-14.46053,0.03392124,2.733883
43.63702,-13.36472,0.03334248,2.193523
44.93553,-12.11641,0.03246325,1.676115
46.71993,-10.79839,0.03138947,1.199303
48.37893,-9.429562,0.03019428,0.740303
50.14563,-8.080639,0.02897739,0.2914562
51.95778,-6.661655,0.02767819,-0.205452
54.09617,-5.187708,0.02633083,-0.7761135
55.77097,-3.668468,0.02497524,-1.450212
57.30831,-2.199844,0.02373183,-2.212687
59.1895,-0.6338196,0.02249897,-3.167665
61.08255,0.8837891,0.02134663,-4.240244
62.51257,2.25366,0.02029252,-5.339197
63.7685,3.594088,0.01925427,-6.548326
64.90067,5.023067,0.0181942,-8.001638
66.1561,6.238184,0.0173682,-9.389461
67.1569,7.4512,0.01661491,-10.93299
68.21931,8.673925,0.01589227,-12.66028
69.68706,9.747389,0.01521975,-14.29118
70.93883,10.80693,0.0144558,-15.95325
72.21665,12.01464,0.01346612,-17.84659
73.57291,13.13946,0.01248181,-19.57445
75.26955,14.35089,0.0114044,-21.39023
76.68607,15.57525,0.0103392,-23.18404
78.10316,16.93556,0.00922364,-25.12559
79.68621,18.34806,0.008156478,-27.05713
80.67054,19.74259,0.007216036,-28.83115
81.28812,21.24534,0.006389737,-30.5632
81.75043,22.94175,0.005742192,-32.2957
82.3013,24.7565,0.005320489,-33.92083
83.2023,26.74791,0.005000949,-35.49497
83.98085,28.6431,0.004681528,-36.85005
84.73767,30.67065,0.004265904,-38.19765
85.64394,32.89785,0.003735423,-39.60934
86.45691,35.22484,0.003129005,-41.04825
87.49799,37.50662,0.002487659,-42.43983
88.36596,39.76094,0.001811564,-43.79713
89.29056,41.90396,0.001147926,-45.07367
90.28658,44.07683,0.0004661679,-46.36629
91.27638,46.26042,-0.0002242327,-47.69373
92.3897,48.53138,-0.0009239912,-49.13923
93.38818,50.72567,-0.00157246,-50.60562
94.3932,52.87076,-0.002210498,-52.10057
95.36486,55.25838,-0.002953023,-53.83769
96.29475,57.42268,-0.003648669,-55.48357
97.35422,59.70807,-0.004378319,-57.29941
98.19387,61.94453,-0.005060494,-59.156
99.15771,64.22285,-0.005708903,-61.13107
99.96257,66.30701,-0.006263912,-63.00879
100.7657,68.63281,-0.006865501,-65.14618
101.5291,70.73179,-0.007403255,-67.05923
102.0692,72.91418,-0.007922292,-68.98274
102.4436,75.23608,-0.01116216,-70.91808
102.0692,77.5062,-0.05800277,-72.71471
98.28471,84.25238,-0.972598,-78.03915
97.50465,86.55132,-1.589288,-79.86408
96.84185,88.73112,-2.326362,-81.60217
96.51314,90.90707,-3.218815,-83.34663
96.37942,93.17688,-4.323049,-85.17838
96.47769,95.27385,-5.509501,-86.8836
distance x from first pivot,distance y from first pivot,distance z from first pivot,current speed,last pivot name,distance x to last pivot,distance y to last pivot,distance z to last pivot,total distance with wall,distance x with wall,distance y with wall,distance z with wall
-27.67701,-0.7343789,-10.50072,0.0001751238,startPoint,-27.67701,-0.7343789,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.734379,-10.50072,0.0001715181,startPoint,-27.67701,-0.734379,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343792,-10.50072,0.0001698474,startPoint,-27.67701,-0.7343792,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343796,-10.50072,0.0001708636,startPoint,-27.67701,-0.7343796,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343795,-10.50072,0.0001658107,startPoint,-27.67701,-0.7343795,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343795,-10.50072,0.0001678206,startPoint,-27.67701,-0.7343795,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343795,-10.50072,0.0001654364,startPoint,-27.67701,-0.7343795,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343794,-10.50072,0.000164323,startPoint,-27.67701,-0.7343794,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343794,-10.50072,0.0001691313,startPoint,-27.67701,-0.7343794,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343795,-10.50072,0.0001649868,startPoint,-27.67701,-0.7343795,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343796,-10.50072,0.0001681377,startPoint,-27.67701,-0.7343796,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343794,-10.50072,0.0001728803,startPoint,-27.67701,-0.7343794,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.7343791,-10.50072,0.0001683945,startPoint,-27.67701,-0.7343791,-10.50072,16.66806,-70.32,0.4034879,13.95638
-27.67701,-0.734379,-10.50072,0.0001641714,startPoint,-27.67701,-0.734379,-10.50072,16.66806,-70.32,0.4034879,13.95638
......@@ -1050,7 +1050,7 @@ PrefabInstance:
- target: {fileID: 2202606020465897630, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6930703782440394830, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
......
......@@ -32,6 +32,8 @@ public class DataSaver : MonoBehaviour
private menuSystem menu;
private String pName;
private String curentName;
private bool newLineAdded = true;
// public static Action<String,Transform> OnCheckPoint;
private bool stable = false;
......@@ -51,8 +53,9 @@ public class DataSaver : MonoBehaviour
{
if(!stable)
return;
pName = menu.PlayerName;
pName = menu.PlayerName;
timePassed += Time.deltaTime;
......@@ -120,7 +123,7 @@ public class DataSaver : MonoBehaviour
rowDataTemp[11] = "None";
}
rowData.Add(rowDataTemp);
string newLine = string.Format("{0},{1},{2},{3},{4},{5},{6},{7}", rowDataTemp[0], rowDataTemp[1], rowDataTemp[2], rowDataTemp[3],rowDataTemp[4],
string newLine = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}", rowDataTemp[0], rowDataTemp[1], rowDataTemp[2], rowDataTemp[3],rowDataTemp[4],
rowDataTemp[5], rowDataTemp[6], rowDataTemp[7], rowDataTemp[8], rowDataTemp[9], rowDataTemp[10], rowDataTemp[11]);
timePassed = 0;
csv.AppendLine(newLine);
......@@ -140,6 +143,8 @@ public class DataSaver : MonoBehaviour
if (!System.IO.File.Exists(filePath))
{
File.Create(filePath);
newLineAdded = false;
return;
}
//StreamWriter sw = new StreamWriter(filePath);
......@@ -150,12 +155,26 @@ public class DataSaver : MonoBehaviour
try
{
if(File.Exists(filePath))
if (File.Exists(filePath))
{
if (!newLineAdded)
{
string newLine = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}",
"distance x from first pivot", "distance y from first pivot", "distance z from first pivot",
"current speed", "last pivot name", "distance x to last pivot", "distance y to last pivot",
"distance z to last pivot",
"total distance with wall", "distance x with wall", "distance y with wall", "distance z with wall"
);
csv = new StringBuilder();
csv.AppendLine(newLine);
newLineAdded = true;
}
File.AppendAllText(filePath, csv.ToString());
}
}
catch (Exception e)
{
newLineAdded = false;
Console.WriteLine(e);
}
}
......
......@@ -15,7 +15,7 @@ public class Warning : MonoBehaviour
private void OnTriggerEnter(Collider other)
{
Debug.Log("triggerd");
if ( other.tag == "Player")
if ( other.tag.Equals("Player"))
{
DataSaver.pivotPos = pivot.position;
DataSaver.pivotName = this.gameObject.name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment