2019-04-30 01:41:18 +02:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace SanAndreasUnity.Behaviours.Vehicles
|
|
|
|
|
{
|
2019-05-28 16:31:42 +02:00
|
|
|
|
|
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;
|
|
|
|
|
|
2021-02-04 22:16:53 +01:00
|
|
|
|
public RigidbodyInterpolation rigidbodyInterpolationOnServer = RigidbodyInterpolation.None;
|
|
|
|
|
public RigidbodyInterpolation rigidbodyInterpolationOnClient = RigidbodyInterpolation.None;
|
|
|
|
|
|
2019-04-30 02:37:29 +02:00
|
|
|
|
public bool syncLinearVelocity = true;
|
|
|
|
|
public bool syncAngularVelocity = true;
|
2019-05-28 16:31:42 +02:00
|
|
|
|
public Utilities.WhenOnClient whenToDisableRigidBody = Utilities.WhenOnClient.OnlyOnOtherClients;
|
2019-05-06 01:51:25 +02:00
|
|
|
|
public bool syncPedTransformWhileInVehicle = false;
|
2019-05-24 00:54:03 +02:00
|
|
|
|
public bool syncVehicleTransformUsingSyncVars = false;
|
2019-05-24 23:26:31 +02:00
|
|
|
|
public bool controlInputOnLocalPlayer = true;
|
2019-05-24 22:48:00 +02:00
|
|
|
|
public bool controlWheelsOnLocalPlayer = true;
|
2021-02-05 01:04:37 +01:00
|
|
|
|
public bool destroyWheelCollidersOnClient = true;
|
2019-05-24 00:54:03 +02:00
|
|
|
|
|
2019-05-24 16:51:24 +02:00
|
|
|
|
public float vehicleSyncRate = 20;
|
|
|
|
|
|
2020-06-28 16:44:32 +02:00
|
|
|
|
[Range(0.1f, 3f)] public float massToHealthExponent = 1f;
|
|
|
|
|
|
2020-06-21 23:35:39 +02:00
|
|
|
|
public float explosionDamageRadius = 7f;
|
2020-06-28 16:35:35 +02:00
|
|
|
|
public AnimationCurve explosionDamageOverDistanceCurve = AnimationCurve.Linear(0f, 1f, 1f, 0f);
|
2020-06-27 22:50:50 +02:00
|
|
|
|
[Range(0.1f, 3f)] public float explosionMassToDamageExponent = 1f;
|
2020-06-20 16:16:11 +02:00
|
|
|
|
|
2020-07-01 23:36:01 +02:00
|
|
|
|
public GameObject explosionLeftoverPartPrefab;
|
2020-06-20 16:16:11 +02:00
|
|
|
|
public float explosionLeftoverPartsLifetime = 20f;
|
|
|
|
|
public float explosionLeftoverPartsMaxDepenetrationVelocity = 15f;
|
2020-06-20 19:56:55 +02:00
|
|
|
|
public float explosionLeftoverPartsMass = 100f;
|
2020-06-20 16:16:11 +02:00
|
|
|
|
|
2020-06-21 00:33:55 +02:00
|
|
|
|
public GameObject smokePrefab;
|
2020-06-21 01:24:19 +02:00
|
|
|
|
public GameObject flamePrefab;
|
2020-06-21 14:15:20 +02:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|