NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Class MotorcycleModuleWrapper

    MonoBehaviour wrapper for the Motorcycle module.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    ModuleWrapper
    MotorcycleModuleWrapper
    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
    ModuleWrapper.GetModule()

    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.

    Overrides
    ModuleWrapper.SetModule(VehicleComponent)
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics