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;
|
|
|
|
|
|
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;
|
2019-05-24 00:54:03 +02:00
|
|
|
|
|
2019-05-24 16:51:24 +02:00
|
|
|
|
public float vehicleSyncRate = 20;
|
|
|
|
|
|
2020-06-20 19:56:55 +02:00
|
|
|
|
public float explosionForceMultiplier = 700f;
|
|
|
|
|
public float explosionChassisForceMultiplier = 11000f;
|
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;
|
|
|
|
|
|
|
|
|
|
|
2019-04-30 01:41:18 +02:00
|
|
|
|
|
|
|
|
|
void Awake()
|
|
|
|
|
{
|
|
|
|
|
Instance = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|