Commit 7db09697 authored by Danial KordModanlou's avatar Danial KordModanlou

Car AI system updated

parent 1acb95d7
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
<Path>.vs</Path> <Path>.vs</Path>
<Path>Library</Path> <Path>Library</Path>
<Path>Logs</Path> <Path>Logs</Path>
<Path>Temp</Path>
<Path>obj</Path> <Path>obj</Path>
</explicitExcludes> </explicitExcludes>
</component> </component>
......
This diff is collapsed.
...@@ -380,10 +380,10 @@ public class CarAIController : MonoBehaviour ...@@ -380,10 +380,10 @@ public class CarAIController : MonoBehaviour
{ {
MovePath MP = car.GetComponent<MovePath>(); MovePath MP = car.GetComponent<MovePath>();
if (MP.w == movePath.w) // if (MP.w == movePath.w) @Danial
{ // {
ReasonsStoppingCars.CarInView(car, rigbody, distance, startSpeed, ref moveSpeed, ref tempStop, distanceToCar); ReasonsStoppingCars.CarInView(car, rigbody, distance, startSpeed, ref moveSpeed, ref tempStop, distanceToCar);
} // }
} }
} }
else if (hit.transform.CompareTag("Bcycle")) else if (hit.transform.CompareTag("Bcycle"))
......
...@@ -41,7 +41,7 @@ public class Side : MonoBehaviour ...@@ -41,7 +41,7 @@ public class Side : MonoBehaviour
*/ */
private void OnTriggerEnter(Collider other) private void OnTriggerEnter(Collider other)
{ {
print(other.transform.name);
if (other.transform.root.tag == "Player") if (other.transform.root.tag == "Player")
{ {
other.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 1; other.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 1;
...@@ -50,7 +50,7 @@ public class Side : MonoBehaviour ...@@ -50,7 +50,7 @@ public class Side : MonoBehaviour
private void OnTriggerExit(Collider other) private void OnTriggerExit(Collider other)
{ {
print(other.transform.name);
if (other.transform.root.tag == "Player") if (other.transform.root.tag == "Player")
{ {
other.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 0; other.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 0;
...@@ -59,8 +59,7 @@ public class Side : MonoBehaviour ...@@ -59,8 +59,7 @@ public class Side : MonoBehaviour
private void OnTriggerStay(Collider other) private void OnTriggerStay(Collider other)
{ {
print(other.transform.name);
print(other.transform.name);
if (other.transform.root.tag == "Player") if (other.transform.root.tag == "Player")
{ {
other.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 1; other.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 1;
......
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