Rebornbuddy
|
Static Public Member Functions | |
static void | Update (CapabilityManagerHandle handle, CapabilityFlags capability, Func< bool > condition, string reason=null) |
static void | Update (CapabilityManagerHandle handle, CapabilityFlags capability, int timeSpanMs, string reason=null) |
static void | Update (CapabilityManagerHandle handle, CapabilityFlags capability, TimeSpan timeSpan, string reason=null) |
static void | Pulse () |
Performs maintenance operations for the internal capability conditions. | |
static void | Clear (CapabilityFlags capabilities=CapabilityFlags.All, string reason=null) |
Clears all the entries that matches any of capabilities . | |
static void | Clear (CapabilityManagerHandle handle, CapabilityFlags capabilities=CapabilityFlags.All, string reason=null) |
static CapabilityManagerHandle | CreateNewHandle () |
Creates a new handle that can be used to add or update an entry. | |
static CapabilityManagerHandle | Add (CapabilityFlags capability, Func< bool > condition, string reason=null) |
static CapabilityManagerHandle | Add (CapabilityFlags capability, int timeSpanMs, string reason=null) |
static CapabilityManagerHandle | Add (CapabilityFlags capability, TimeSpan timeSpan, string reason=null) |
This manager allows multiple sources to disallow a CombatRoutine capability for specific time or until a condition evaluates
to false
and once no sources are disallowing a capability, that capability is then allowed
|
static |
Adds a new entry that disallows capability until
condition evaluates to false
, at which
point the entry is removed and capability is allowed if
no other entries for capability are maintained.
capability | The capability. |
condition | The condition. |
reason | The reason. |
|
static |
Adds a new entry that disallows capability for
timeSpanMs duration in milliseconds, at which point the entry is removed and
capability is allowed if no other entries for capability are maintained.
capability | The capability. |
timeSpanMs | The timeSpanMs. |
reason | The reason. |
OverflowException | timeSpanMs is less than F:System.TimeSpan.MinValue or greater than F:System.TimeSpan.MaxValue.-or-timeSpanMs is F:System.Double.PositiveInfinity.-or-timeSpanMs is F:System.Double.NegativeInfinity. |
|
static |
Adds a new entry that disallows capability for
timeSpan duration, at which
point the entry is removed and capability is allowed if
no other entries for capability are maintained.
capability | The capability. |
timeSpan | The timeSpan. |
reason | The reason. |
|
static |
Clears all the entries that matches any of capabilities .
capabilities | The capabilities. |
reason | The reason. |
|
static |
Clears all the entries that matches any of capabilities
and are associated with handle or all matching entries if handle is null.
handle | The handle. |
capabilities | The capabilities. |
reason | The reason. |
|
static |
Creates a new handle that can be used to add or update an entry.
|
static |
Performs maintenance operations for the internal capability conditions.
This method iterates through all condition entries maintained by the capability manager, evaluates their respective conditions, and removes those entries whose conditions evaluate to false or are no longer valid. If all entries for a specific capability are cleared, the capability state is updated to indicate no active restrictions.
|
static |
Updates an entry (or adds a new one if entry is not present) to disallow
capability until condition evaluates
to false
, at which point the entry is removed and capability
is allowed if no other entries for capability are maintained.
handle | The handle. |
capability | The capability. |
condition | The condition. |
reason | The reason. |
System.ArgumentNullException | condition |
|
static |
Updates an entry (or adds a new one if entry is not present) to disallow capability for
timeSpanMs duration in milliseconds. The entry is removed upon expiration and
capability is allowed if no other entries for capability are maintained.
handle | The handle. |
capability | The capability. |
timeSpanMs | The timeSpanMs. |
reason | The reason. |
OverflowException | timeSpanMs is less than F:System.TimeSpan.MinValue or greater than F:System.TimeSpan.MaxValue.-or-timeSpanMs is F:System.Double.PositiveInfinity.-or-timeSpanMs is F:System.Double.NegativeInfinity. |
|
static |
Updates an entry (or adds a new one if entry is not present) to disallow capability for
timeSpan duration. The entry is removed upon expiration
and capability is allowed if
no other entries for capability are maintained.
handle | The handle. |
capability | The capability. |
timeSpan | The timeSpan. |
reason | The reason. |
ArgumentNullException | The value of 'handle' cannot be null. |