OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Interface IVehicle

Represents a vehicle.

Inherited Members
IHasOwnership.Ownership
Namespace: OpenMod.Extensions.Games.Abstractions.Vehicles
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IVehicle : IHasOwnership

Properties

| Improve this Doc View Source

Asset

Gets the asset of the vehicle.

Declaration
IVehicleAsset Asset { get; }
Property Value
Type Description
IVehicleAsset
| Improve this Doc View Source

Driver

Gets the driver of the vehicle.

Declaration
IEntity Driver { get; }
Property Value
Type Description
IEntity
| Improve this Doc View Source

Passengers

Gets the passengers of the vehicle.

Declaration
IReadOnlyCollection<IEntity> Passengers { get; }
Property Value
Type Description
IReadOnlyCollection<IEntity>
| Improve this Doc View Source

State

Gets the state of the vehicle.

Declaration
IVehicleState State { get; }
Property Value
Type Description
IVehicleState
| Improve this Doc View Source

Transform

Gets the transform of the vehicle.

Declaration
IWorldTransform Transform { get; }
Property Value
Type Description
IWorldTransform
| Improve this Doc View Source

VehicleInstanceId

Gets the unique instance ID of the vehicle.

Declaration
string VehicleInstanceId { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

AddPassengerAsync(IEntity)

Adds a passenger to the vehicle.

Declaration
Task<bool> AddPassengerAsync(IEntity passenger)
Parameters
Type Name Description
IEntity passenger

The passenger to add.

Returns
Type Description
Task<System.Boolean>

True if the passenger was added; otherwise, false.

| Improve this Doc View Source

DestroyAsync()

Destroys the vehicle.

Declaration
Task DestroyAsync()
Returns
Type Description
Task
| Improve this Doc View Source

RemovePassengerAsync(IEntity)

Removes a passenger from the vehicle.

Declaration
Task<bool> RemovePassengerAsync(IEntity passenger)
Parameters
Type Name Description
IEntity passenger

The passenger to remove.

Returns
Type Description
Task<System.Boolean>

True if the passenger was removed; otherwise, false.

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)