Game.Pathfind.TimeActionFlags
Assembly: Assembly-CSharp
Namespace: Game.Pathfind
Type: public enum
Base: System.Enum
Summary:
TimeActionFlags is a bit field (flags) enum used by the pathfinding/time-action systems to represent one or more actions that should be applied to a time-related target. The [Flags] attribute allows combinations of these values via bitwise operations so callers can specify multiple actions at once (for example, setting a primary time and enabling forward movement). Each named value maps to a single bit so they can be combined and tested efficiently.
Fields
-
SetPrimary = 1
Marks the action as "set primary" — typically indicates assigning or updating the primary time/state. -
SetSecondary = 2
Marks the action as "set secondary" — typically indicates assigning or updating a secondary time/state. -
EnableForward = 4
Indicates forward movement/activation should be enabled. -
EnableBackward = 8
Indicates backward movement/activation should be enabled.
Properties
- None
As an enum type, TimeActionFlags does not declare instance properties.
Constructors
- None (compiler-provided)
Enums do not have user-defined constructors. The runtime provides default behavior to work with the underlying integral values.
Methods
- None
No methods are declared on this enum type. Use standard bitwise operators and Enum helper methods if needed.
Usage Example
// Combine flags: set primary and enable forward
TimeActionFlags flags = TimeActionFlags.SetPrimary | TimeActionFlags.EnableForward;
// Test whether a specific flag is set
bool isPrimarySet = (flags & TimeActionFlags.SetPrimary) != 0;
bool forwardEnabled = (flags & TimeActionFlags.EnableForward) != 0;
// Add a flag (enable backward)
flags |= TimeActionFlags.EnableBackward;
// Remove a flag (disable forward)
flags &= ~TimeActionFlags.EnableForward;
// Check for multiple flags at once
bool primaryAndBackward = (flags & (TimeActionFlags.SetPrimary | TimeActionFlags.EnableBackward))
== (TimeActionFlags.SetPrimary | TimeActionFlags.EnableBackward);
Notes: - Because this enum is decorated with [Flags], prefer bitwise operations for combining and checking values. - When persisting or serializing flags, consider using integer representations to ensure compatibility with systems expecting numeric values.