Game.Prefabs.TrailerMovementType
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: enum
Base: System.Enum
Summary:
Represents the movement behavior mode for trailer prefabs. Used to indicate whether a trailer should move independently (free) or be constrained/locked to its towing vehicle (locked). Typically referenced by vehicle/prefab logic that orchestrates trailer attachment, physics, or animation synchronization.
Fields
-
Free = 0
Indicates the trailer can move independently from its towing vehicle (free movement). Use this when trailer pathing, steering, or animation is handled separately from the parent vehicle. -
Locked = 1
Indicates the trailer is locked to the towing vehicle and should follow the parent vehicle's movement/rotation closely. Use this when the trailer should behave as a rigidly attached part of the vehicle unit.
Properties
- None.
This enum does not declare any properties; it only provides the named constant values above.
Constructors
- Implicit enum constructor (private)
Enums have an implicit private constructor; values are assigned as listed (Free = 0, Locked = 1). No public constructors are available.
Methods
- Inherited from System.Enum / System.ValueType / System.Object, e.g.:
- ToString() : System.String
- HasFlag(System.Enum) : System.Boolean
- CompareTo(System.Object) : System.Int32
- GetHashCode() : System.Int32
- Equals(System.Object) : System.Boolean
This enum declares no additional methods beyond the standard ones provided by System.Enum.
Usage Example
// Example usage: reading a prefab setting and handling trailer movement mode
using Game.Prefabs;
public void ConfigureTrailerMovement(TrailerMovementType mode)
{
switch (mode)
{
case TrailerMovementType.Free:
// Allow trailer-specific AI/pathing/animation
EnableIndependentTrailerLogic();
break;
case TrailerMovementType.Locked:
// Tie trailer transform/physics to parent vehicle
LockTrailerToTowingVehicle();
break;
}
}
// Simple assignment
TrailerMovementType defaultMode = TrailerMovementType.Free;