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