Class MotorcycleModuleWrapper
MonoBehaviour wrapper for the Motorcycle module.
Namespace: NWH.VehiclePhysics2.Modules.MotorcycleModule
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
[DisallowMultipleComponent]
public class MotorcycleModuleWrapper : ModuleWrapper
Remarks
Goes on a GameObject with a VehicleController. The powertrain must have exactly 2 wheels, front at index 0 and rear at index 1; the module asserts this on initialization.
Fields
module
The MotorcycleModule instance managed by this wrapper.
Declaration
public MotorcycleModule module
Field Value
| Type | Description |
|---|---|
| MotorcycleModule |
Methods
GetModule()
Returns the contained MotorcycleModule as a VehicleComponent.
Declaration
public override VehicleComponent GetModule()
Returns
| Type | Description |
|---|---|
| VehicleComponent | The MotorcycleModule instance cast to VehicleComponent. |
Overrides
SetModule(VehicleComponent)
Sets the contained module from a VehicleComponent reference.
Declaration
public override void SetModule(VehicleComponent module)
Parameters
| Type | Name | Description |
|---|---|---|
| VehicleComponent | module | The VehicleComponent to set, must be a MotorcycleModule instance. |