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
Inherited Members
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
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
VC_DrawGizmos()
Draws gizmos for manager and all enabled children.
Declaration
public override void VC_DrawGizmos()
Overrides
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
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
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
VC_LoadStateFromStateSettings()
Loads state from StateSettings for manager and all children.
Declaration
public override void VC_LoadStateFromStateSettings()
Overrides
VC_SetDefaults()
Resets manager and all children to defaults.
Declaration
public override void VC_SetDefaults()
Overrides
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
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 |