SanAndreasUnity/Assets/Scripts/Behaviours/Vehicles/VehicleManager.cs

55 lines
1.8 KiB
C#
Raw Normal View History

2019-04-30 01:41:18 +02:00
using UnityEngine;
namespace SanAndreasUnity.Behaviours.Vehicles
{
2019-04-30 01:41:18 +02:00
public class VehicleManager : MonoBehaviour
{
public static VehicleManager Instance { get; private set; }
public GameObject vehiclePrefab;
2019-07-29 02:10:59 +02:00
public float cameraDistanceFromVehicle = 6f;
public RigidbodyInterpolation rigidbodyInterpolationOnServer = RigidbodyInterpolation.None;
public RigidbodyInterpolation rigidbodyInterpolationOnClient = RigidbodyInterpolation.None;
public bool syncLinearVelocity = true;
public bool syncAngularVelocity = true;
public Utilities.WhenOnClient whenToDisableRigidBody = Utilities.WhenOnClient.OnlyOnOtherClients;
public bool syncPedTransformWhileInVehicle = false;
public bool syncVehicleTransformUsingSyncVars = false;
public bool controlInputOnLocalPlayer = true;
public bool controlWheelsOnLocalPlayer = true;
public bool destroyWheelCollidersOnClient = true;
2019-05-24 16:51:24 +02:00
public float vehicleSyncRate = 20;
[Range(0.1f, 3f)] public float massToHealthExponent = 1f;
2020-06-21 23:35:39 +02:00
public float explosionDamageRadius = 7f;
public AnimationCurve explosionDamageOverDistanceCurve = AnimationCurve.Linear(0f, 1f, 1f, 0f);
[Range(0.1f, 3f)] public float explosionMassToDamageExponent = 1f;
public GameObject explosionLeftoverPartPrefab;
public float explosionLeftoverPartsLifetime = 20f;
public float explosionLeftoverPartsMaxDepenetrationVelocity = 15f;
public float explosionLeftoverPartsMass = 100f;
2020-06-21 00:33:55 +02:00
public GameObject smokePrefab;
2020-06-21 01:24:19 +02:00
public GameObject flamePrefab;
public GameObject explosionPrefab;
2020-06-21 00:33:55 +02:00
2021-01-02 23:22:52 +01:00
[Range(0f, 1f)] public float radioVolume = 1f;
2020-06-21 00:33:55 +02:00
2019-04-30 01:41:18 +02:00
void Awake()
{
Instance = this;
}
}
}