Game.Net.LaneSignalFlags
Assembly:
Assembly-CSharp (inferred)
Namespace: Game.Net
Type: public enum
Base: System.Enum (underlying type: System.Byte)
Summary: LaneSignalFlags is a small enum used to represent per-lane signal attributes in the networking layer (Game.Net). It uses a byte as the underlying storage and defines bitwise flag values (CanExtend and Physical). Although not decorated with [Flags], its values are arranged for bitwise combination and are commonly read/written as a byte when serializing/deserializing over the network.
Fields
-
CanExtend = 1
Indicates that the lane signal can be extended (first bit). Numeric value: 1. Used to mark a lane signal attribute that can be combined with other flags. -
Physical = 2
Indicates a physical signal attribute (second bit). Numeric value: 2. Can be combined with CanExtend to represent multiple attributes at once.
Properties
- This enum type has no properties.
Constructors
- Enums do not define constructors. Note: the default enum value (0) is not defined among the named members of this enum. Casting 0 to LaneSignalFlags yields an unnamed/zero value.
Methods
- This enum type defines no methods.
Usage Example
// Combine flags
LaneSignalFlags flags = LaneSignalFlags.CanExtend | LaneSignalFlags.Physical;
// Check for a specific flag
bool canExtend = (flags & LaneSignalFlags.CanExtend) == LaneSignalFlags.CanExtend;
bool isPhysical = (flags & LaneSignalFlags.Physical) == LaneSignalFlags.Physical;
// Serialize/deserialize to a byte for network I/O
byte serialized = (byte)flags;
LaneSignalFlags deserialized = (LaneSignalFlags)serialized;
// Be aware: the enum is not marked with [Flags], but bitwise operations still work.