Skip to content

Game.Prefabs.VehicleCarriageDirection

Assembly: Game (likely compiled into Assembly-CSharp in the game build)
Namespace: Game.Prefabs

Type: enum

Base: System.Enum

Summary:
Enumeration that specifies the orientation/placement of a vehicle's carriage relative to the vehicle's forward direction. Used by vehicle prefabs and spawning/visual logic to determine whether attached carriages (trailers, wagons, etc.) should follow the default orientation, be reversed, or be chosen randomly for variety.


Fields

  • Default
    Use the carriage orientation as defined by the vehicle prefab (the carriage follows the vehicle's normal forward orientation).

  • Reversed
    Flip the carriage orientation (typically a 180-degree rotation relative to the normal forward direction).

  • Random
    Choose the carriage orientation randomly at spawn or when applying visuals; useful to add visual variety.

Properties

  • None specific to this enum. (Standard System.Enum members/methods are available.)

Constructors

  • Enums are compiler-generated value types and have no explicit constructors defined in code. Values are the named constants above.

Methods

  • No custom methods are defined on this enum. Standard System.Enum operations (ToString, Parse, TryParse, etc.) can be used.

Usage Example

// Simple assignment
VehicleCarriageDirection dir = VehicleCarriageDirection.Random;

// Switch usage in prefab/visual logic
switch (dir)
{
    case VehicleCarriageDirection.Default:
        // apply prefab's default carriage transform
        break;
    case VehicleCarriageDirection.Reversed:
        // apply reversed carriage transform (rotate 180 degrees)
        break;
    case VehicleCarriageDirection.Random:
        // pick default or reversed randomly
        break;
}