Compare commits

..

No commits in common. "15ac78b26af4c9e54e2d30c7f1781dddf64fc6f2" and "51148ef5e21835ae16402b6ec64975efe3436301" have entirely different histories.

4 changed files with 10 additions and 6 deletions

View file

@ -95,9 +95,10 @@ public class AICar : MonoBehaviour
{ {
var hasChild = false; var hasChild = false;
var i = 0; var i = 0;
GameObject test;
while (!hasChild) while (!hasChild)
{ {
var test = gameObject.transform.GetChild(i).gameObject; test = gameObject.transform.GetChild(i).gameObject;
if (test.name == "Target") if (test.name == "Target")
{ {
_driveTarget = test.transform; _driveTarget = test.transform;

View file

@ -67,7 +67,7 @@ public class AIManager : MonoBehaviour
_ais = GameObject.FindGameObjectsWithTag("AIs"); _ais = GameObject.FindGameObjectsWithTag("AIs");
if (_ais.Length < maxAI) if (_ais.Length < maxAI)
{ {
// var instance = Instantiate(aiPrefab, gameObject.transform); var instance = Instantiate(aiPrefab, gameObject.transform);
} }
foreach (var i in _ais) foreach (var i in _ais)

View file

@ -6,7 +6,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using UnityEngine; using UnityEngine;
/// <summary> /// <summary>
@ -103,8 +102,9 @@ public class CarController : MonoBehaviour
/// </summary> /// </summary>
public void Steering() public void Steering()
{ {
foreach (var wheel in wheels.Where(wheel => wheel.axel == Axel.Front)) foreach (var wheel in wheels)
wheel.wheelCollider.steerAngle = _currentTurn; if (wheel.axel == Axel.Front)
wheel.wheelCollider.steerAngle = _currentTurn;
} }
/// <summary> /// <summary>

View file

@ -96,7 +96,10 @@ public class Door : CommonInteractable
{ {
currentDuration = 0; currentDuration = 0;
_opening = false; _opening = false;
_isOpen = !_isOpen; if (_isOpen)
_isOpen = false;
else
_isOpen = true;
} }
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();