Game.Vehicles.HelicopterType
Assembly:
Assembly-CSharp
Namespace:
Game.Vehicles
Type:
enum (byte)
Base:
System.Enum (underlying type: System.Byte)
Summary:
Represents the category/type of a vertical takeoff vehicle used by the game (e.g., standard helicopters and rocket-like vehicles). The enum uses a byte as its underlying type, which keeps storage compact for serialization and in-game data structures. Mods can use this enum to branch logic for different vehicle behavior, visuals, or spawning rules.
Fields
-
Helicopter
Value: 0 — Standard helicopter-type vehicle. Use this for conventional helicopter behaviors (hover, rescue, transport within city bounds). -
Rocket
Value: 1 — Rocket-like vertical vehicle. Use this for behaviors or assets that correspond to rockets or shuttle-style vehicles (different animations, flight path logic, or special effects).
Properties
- This enum has no properties.
Constructors
- This enum has no constructors (enum values are compiled constants).
Methods
- This enum declares no methods.
Usage Example
using Game.Vehicles;
public void SpawnVehicle(HelicopterType type)
{
switch (type)
{
case HelicopterType.Helicopter:
// spawn helicopter prefab / apply helicopter AI
SpawnPrefab("HelicopterPrefab");
break;
case HelicopterType.Rocket:
// spawn rocket prefab / apply rocket-specific AI or effects
SpawnPrefab("RocketPrefab");
break;
}
}
// Example of checking an existing vehicle's type
HelicopterType type = GetVehicleType(myVehicleId);
if (type == HelicopterType.Rocket)
{
// give special handling for rockets
EnableRocketTrail(myVehicleId);
}
Additional notes:
- Because the underlying type is byte, values are compact and suitable for network or save serialization.
- If extending or interpreting this enum in mods, ensure compatibility with game code that consumes these values — adding custom values that the base game doesn't recognize will require handling in your mod logic and may not be understood by unmodified game systems.