NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Class ManagerVehicleComponent

    Base class for components that manage child VehicleComponents (EffectManager, SoundManager, ModuleManager). Propagates all VC_ lifecycle methods to children. Override FillComponentList() to define your child collection.

    Inheritance
    object
    VehicleComponent
    ManagerVehicleComponent
    EffectManager
    ModuleManager
    Powertrain
    SoundManager
    Inherited Members
    VehicleComponent.state
    VehicleComponent.vehicleController
    VehicleComponent.IsActive
    VehicleComponent.VC_Initialize()
    VehicleComponent.ToggleState()
    Namespace: NWH.VehiclePhysics2
    Assembly: NWH.VehiclePhysics2.dll
    Syntax
    public abstract class ManagerVehicleComponent : VehicleComponent

    Fields

    _components

    Child components managed by this manager. Populated by FillComponentList().

    Declaration
    [NonSerialized]
    protected List<VehicleComponent> _components
    Field Value
    Type Description
    List<VehicleComponent>

    Properties

    Components

    Child components - lazily initialized via FillComponentList() on first access.

    Declaration
    public virtual List<VehicleComponent> Components { get; }
    Property Value
    Type Description
    List<VehicleComponent>

    Methods

    AddAndOnboardNewComponent(VehicleComponent)

    Adds component at runtime: adds to list, initializes, loads state, and updates LOD.

    Declaration
    public void AddAndOnboardNewComponent(VehicleComponent component)
    Parameters
    Type Name Description
    VehicleComponent component

    FillComponentList()

    Override to populate _components with your child components. Called lazily on first Components access.

    Declaration
    protected abstract void FillComponentList()

    UpdateLOD()

    Updates LOD for manager and all children.

    Declaration
    public override void UpdateLOD()
    Overrides
    VehicleComponent.UpdateLOD()

    VC_Disable(bool)

    Disables manager and all children (with calledByParent=true).

    Declaration
    public override bool VC_Disable(bool calledByParent)
    Parameters
    Type Name Description
    bool calledByParent
    Returns
    Type Description
    bool
    Overrides
    VehicleComponent.VC_Disable(bool)

    VC_DrawGizmos()

    Draws gizmos for manager and all enabled children.

    Declaration
    public override void VC_DrawGizmos()
    Overrides
    VehicleComponent.VC_DrawGizmos()

    VC_Enable(bool)

    Enables manager and all children (with calledByParent=true).

    Declaration
    public override bool VC_Enable(bool calledByParent)
    Parameters
    Type Name Description
    bool calledByParent
    Returns
    Type Description
    bool
    Overrides
    VehicleComponent.VC_Enable(bool)

    VC_FixedUpdate(float)

    Physics update for manager and all active children.

    Declaration
    public override void VC_FixedUpdate(float DeltaTime)
    Parameters
    Type Name Description
    float DeltaTime
    Overrides
    VehicleComponent.VC_FixedUpdate(float)

    VC_Initialize(VehicleController)

    Initializes manager and all children with VehicleController reference.

    Declaration
    public override void VC_Initialize(VehicleController vc)
    Parameters
    Type Name Description
    VehicleController vc
    Overrides
    VehicleComponent.VC_Initialize(VehicleController)

    VC_LoadStateFromStateSettings()

    Loads state from StateSettings for manager and all children.

    Declaration
    public override void VC_LoadStateFromStateSettings()
    Overrides
    VehicleComponent.VC_LoadStateFromStateSettings()

    VC_SetDefaults()

    Resets manager and all children to defaults.

    Declaration
    public override void VC_SetDefaults()
    Overrides
    VehicleComponent.VC_SetDefaults()

    VC_Update(float)

    Frame update for manager and all active children.

    Declaration
    public override void VC_Update(float DeltaTime)
    Parameters
    Type Name Description
    float DeltaTime
    Overrides
    VehicleComponent.VC_Update(float)

    VC_Validate(VehicleController)

    Validates manager and all enabled children. Skips if manager is disabled.

    Declaration
    public override void VC_Validate(VehicleController vc)
    Parameters
    Type Name Description
    VehicleController vc
    Overrides
    VehicleComponent.VC_Validate(VehicleController)
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics