Compare commits
No commits in common. "15ac78b26af4c9e54e2d30c7f1781dddf64fc6f2" and "51148ef5e21835ae16402b6ec64975efe3436301" have entirely different histories.
15ac78b26a
...
51148ef5e2
4 changed files with 10 additions and 6 deletions
|
@ -95,9 +95,10 @@ public class AICar : MonoBehaviour
|
|||
{
|
||||
var hasChild = false;
|
||||
var i = 0;
|
||||
GameObject test;
|
||||
while (!hasChild)
|
||||
{
|
||||
var test = gameObject.transform.GetChild(i).gameObject;
|
||||
test = gameObject.transform.GetChild(i).gameObject;
|
||||
if (test.name == "Target")
|
||||
{
|
||||
_driveTarget = test.transform;
|
||||
|
|
|
@ -67,7 +67,7 @@ public class AIManager : MonoBehaviour
|
|||
_ais = GameObject.FindGameObjectsWithTag("AIs");
|
||||
if (_ais.Length < maxAI)
|
||||
{
|
||||
// var instance = Instantiate(aiPrefab, gameObject.transform);
|
||||
var instance = Instantiate(aiPrefab, gameObject.transform);
|
||||
}
|
||||
|
||||
foreach (var i in _ais)
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
|
@ -103,8 +102,9 @@ public class CarController : MonoBehaviour
|
|||
/// </summary>
|
||||
public void Steering()
|
||||
{
|
||||
foreach (var wheel in wheels.Where(wheel => wheel.axel == Axel.Front))
|
||||
wheel.wheelCollider.steerAngle = _currentTurn;
|
||||
foreach (var wheel in wheels)
|
||||
if (wheel.axel == Axel.Front)
|
||||
wheel.wheelCollider.steerAngle = _currentTurn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -96,7 +96,10 @@ public class Door : CommonInteractable
|
|||
{
|
||||
currentDuration = 0;
|
||||
_opening = false;
|
||||
_isOpen = !_isOpen;
|
||||
if (_isOpen)
|
||||
_isOpen = false;
|
||||
else
|
||||
_isOpen = true;
|
||||
}
|
||||
|
||||
yield return new WaitForEndOfFrame();
|
||||
|
|
Reference in a new issue