Class LandVehicle
Represents a land vehicle in the game.
public class LandVehicle
- Inheritance
-
LandVehicle
- Inherited Members
- Extension Methods
Constructors
LandVehicle(string)
Creates a new LandVehicle instance.
public LandVehicle(string vehicleCode)
Parameters
vehicleCodestring
Properties
Color
Vehicle's color.
public VehicleColor Color { get; set; }
Property Value
GUID
Unique GUID string for this vehicle.
public string GUID { get; }
Property Value
IsOccupied
If this vehicle has any occupants
public bool IsOccupied { get; set; }
Property Value
IsPlayerOwned
If the vehicle is owned by the player.
public bool IsPlayerOwned { get; set; }
Property Value
Storage
Trunk space
public StorageInstance Storage { get; }
Property Value
TopSpeed
Vehicle's top speed.
public float TopSpeed { get; set; }
Property Value
VehiclePrice
Vehicle price.
public float VehiclePrice { get; set; }
Property Value
Methods
AlignTo(Transform, ParkingAlignment, bool)
public void AlignTo(Transform target, ParkingAlignment type, bool network = false)
Parameters
targetTransformtypeParkingAlignmentnetworkbool
ApplyColor(VehicleColor)
public void ApplyColor(VehicleColor col)
Parameters
colVehicleColor
DestroyVehichle()
Deletes the land vehicle
public void DestroyVehichle()
ExitPark(bool)
Exit parking spot, and optionally, the parking lot
public void ExitPark(bool moveToExitPoint = true)
Parameters
moveToExitPointbool
Park(ParkingData, bool)
Parks the vehicle in the specified slot ParkingData
public void Park(ParkingData parkData, bool network)
Parameters
parkDataParkingDatanetworkbool
SetVisible(bool)
Set this vehicle as visible or not
public void SetVisible(bool vis)
Parameters
visbool
Spawn(Vector3, Quaternion)
Spawns the vehicle in the game world.
public void Spawn(Vector3 position, Quaternion rotation)
Parameters
positionVector3Position in the world
rotationQuaternionRotation of the vehicle
Events
OnCollision
When this vehicle has collided with something
public event Action<Collision> OnCollision
Event Type
- Action<Collision>
OnHandbrakeApplied
When the handbrake has been applied
public event Action OnHandbrakeApplied
Event Type
OnVehicleStart
When this vehicle has started
public event Action OnVehicleStart
Event Type
OnVehicleStop
When this vehicle has stopped
public event Action OnVehicleStop