Interface IVehicle
Represents a vehicle.
Inherited Members
Namespace: OpenMod.Extensions.Games.Abstractions.Vehicles
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IVehicle : IHasOwnership
Properties
| Improve this Doc View SourceAsset
Gets the asset of the vehicle.
Declaration
IVehicleAsset Asset { get; }
Property Value
Type | Description |
---|---|
IVehicleAsset |
Driver
Gets the driver of the vehicle.
Declaration
IEntity Driver { get; }
Property Value
Type | Description |
---|---|
IEntity |
Passengers
Gets the passengers of the vehicle.
Declaration
IReadOnlyCollection<IEntity> Passengers { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<IEntity> |
State
Gets the state of the vehicle.
Declaration
IVehicleState State { get; }
Property Value
Type | Description |
---|---|
IVehicleState |
Transform
Gets the transform of the vehicle.
Declaration
IWorldTransform Transform { get; }
Property Value
Type | Description |
---|---|
IWorldTransform |
VehicleInstanceId
Gets the unique instance ID of the vehicle.
Declaration
string VehicleInstanceId { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAddPassengerAsync(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. |
DestroyAsync()
Destroys the vehicle.
Declaration
Task DestroyAsync()
Returns
Type | Description |
---|---|
Task |
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. |