mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-17 05:18:27 +00:00
Rename var
This commit is contained in:
parent
531da482ff
commit
7360e6f0ca
2 changed files with 5 additions and 5 deletions
|
@ -276,7 +276,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
|
||||
public Transform DriverTransform { get; private set; }
|
||||
|
||||
public bool HasDriver { get { return DriverTransform != null && DriverTransform.childCount > 0; } }
|
||||
public bool HasDriverSeat { get { return DriverTransform != null && DriverTransform.childCount > 0; } }
|
||||
|
||||
public bool IsControlling { get { return _controller != null; } }
|
||||
|
||||
|
@ -368,7 +368,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
float horAxis = Input.GetAxis("Horizontal");
|
||||
|
||||
// Set car lights
|
||||
if (HasDriver)
|
||||
if (HasDriverSeat)
|
||||
{
|
||||
if (horAxis != 0)
|
||||
blinkerMode = horAxis < 0 ? VehicleBlinkerMode.Left : VehicleBlinkerMode.Right;
|
||||
|
@ -404,7 +404,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
wheel.Child.localRotation = Quaternion.AngleAxis(wheel.Collider.steerAngle, Vector3.up) * wheel.Roll;
|
||||
}
|
||||
|
||||
if (HasDriver)
|
||||
if (HasDriverSeat)
|
||||
{
|
||||
if(Input.GetKeyDown(KeyCode.F))
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ public class VehicleBlinker : MonoBehaviour
|
|||
private void Update()
|
||||
{
|
||||
// Must review
|
||||
if (vehicle.HasDriver && !ShouldBePowered && blinkerSwitch)
|
||||
if (vehicle.HasDriverSeat && !ShouldBePowered && blinkerSwitch)
|
||||
{
|
||||
//Debug.Log("Turning off blinkers!");
|
||||
blinkerSwitch = false;
|
||||
|
@ -110,7 +110,7 @@ public class VehicleBlinker : MonoBehaviour
|
|||
|
||||
private void Cycle()
|
||||
{
|
||||
if (!(vehicle.HasDriver && ShouldBePowered))
|
||||
if (!(vehicle.HasDriverSeat && ShouldBePowered))
|
||||
return;
|
||||
|
||||
blinkerSwitch = !blinkerSwitch;
|
||||
|
|
Loading…
Add table
Reference in a new issue