Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.6.0
Menu

BitQuirky.Behavior.Nodes.Decorator

Public behavior trees and state machines: runtime symbols in BitQuirky.Behavior.Nodes.Decorator.

Source snapshot ad0983d00d77.

Assembly: BitQuirky.Behavior.Runtime

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.Conditional

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Conditional.cs:21-39

Decorator that admits and runs its single child only while a continuously observed fact succeeds, and cancels that child synchronously when the fact fails and the decorator carries the Self abort scope.

Responsibilities:

  • Provide the baked / token identity for cross-layer correspondence.
  • Encode the admission rule for the runtime tick job.

Does NOT:

  • Hold per-instance observation state; that lives on the per-follower runtime instance.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = Conditional

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Conditional.cs:28

Baked runtime node kind.

C#
public const string NodeKindToken = "conditional"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Conditional.cs:24-25

Canonical source node-kind token.

C#
public static bool Admit(BitQuirky.Behavior.Execution.BehaviorResultCode factResult)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Conditional.cs:35-38

Admit the decorated child for one evaluation.

Parameters

  • factResult: The just-evaluated observed-fact result.

Returns

Whether the child may run under the observed fact.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.Inverter

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Inverter.cs:38-64

Decorator that flips its child’sSuccess andFailure. Other status codes pass through unchanged so authority / timeout / interrupted information reaches parents intact.

Responsibilities:

  • Encode the canonical inversion rule for the runtime tick job and bake-time validation.

Does NOT:

  • Re-tick its child - this is a stateless decorator; the child is ticked once per parent tick.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = Inverter

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Inverter.cs:45

Baked node kind an inverter bakes to.

C#
public const string NodeKindToken = "inverter"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Inverter.cs:41-42

Kind token an inverter carries in authored graph source.

C#
public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Inverter.cs:52-63

Maps the child’s status to the decorator’s own: Success becomes Failure and Failure becomes Success. Running, Blocked, Interrupted, Timeout, and AuthorityMismatch pass through unchanged, so a parent still sees why the subtree stopped.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.Repeat

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:66-199

Decorator that re-ticks its single child according to a RepeatPolicy.

Responsibilities:

  • Encode the repeat aggregation rule for the runtime tick job.
  • Provide the baked / token identity for cross-layer correspondence.

Does NOT:

  • Hold per-instance counters; those live in the per-follower artifact-indexed runtime state.

C#
public const int CountParameterId = 967958004

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:108

Stable baked id for the bounded repeat-count parameter.

C#
public const int CountPolicyId = 967958004

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:111

Stable baked id for CountPolicyToken.

C#
public const string CountPolicyToken = "count"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:93

Canonical source token for bounded repeat behavior.

C#
public const int ForeverPolicyId = 2056224888

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:114

Stable baked id for ForeverPolicyToken.

C#
public const string ForeverPolicyToken = "forever"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:96

Canonical source token for repetition until the containing behavior exits.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = Repeat

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:127

Baked runtime node kind.

C#
public const string NodeKindToken = "repeat"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:123-124

Canonical source node-kind token.

C#
public const int PolicyParameterId = -826213761

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:105

Stable baked id for the repeat policy parameter.

C#
public const int UntilFailurePolicyId = -1384370814

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:117

Stable baked id for UntilFailurePolicyToken.

C#
public const string UntilFailurePolicyToken = "until_failure"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:99

Canonical source token for repeat-until-child-failure behavior.

C#
public const int UntilSuccessPolicyId = 1828212339

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:120

Stable baked id for UntilSuccessPolicyToken.

C#
public const string UntilSuccessPolicyToken = "until_success"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:102

Canonical source token for repeat-until-child-success behavior.

Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, out int iterationsCompletedNext)

Section titled “Decorate(BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, RepeatPolicy policy, out int iterationsCompletedNext)”
C#
public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, int iterationsCompleted, int targetCount, BitQuirky.Behavior.Nodes.Decorator.RepeatPolicy policy, out int iterationsCompletedNext)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:141-198

Aggregate one child tick.

Parameters

  • childStatus: The just-finished child’s status.
  • iterationsCompleted: Number of completed Success, Failure, or Blocked attempts before this tick.
  • targetCount: For FixedCount: the desired iteration count.
  • policy: Termination policy.
  • iterationsCompletedNext: The new iteration counter the runtime should record for the per-follower state.

Category: Node contracts

C#
enum BitQuirky.Behavior.Nodes.Decorator.RepeatPolicy

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:28-52

Underlying type: byte

Repeat termination policy.

C#
FixedCount = 0

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:34

Repeatcountcompleted attempts, then return the final child’s result. Negative or zero count is treated as one tick (no repeat).

C#
Forever = 3

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:51

Restart after every completed child attempt until the containing behavior exits.

C#
UntilFailure = 1

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:40

Repeat indefinitely after Success or Running. Stops on child Failure or Blocked, returned through to the parent.

C#
UntilSuccess = 2

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/Repeat.cs:46

Repeat indefinitely after Failure, Blocked, or Running. Stops on child Success, returned through to the parent.

Category: Node contracts

C#
class BitQuirky.Behavior.Nodes.Decorator.TimeLimit

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/TimeLimit.cs:41-76

Decorator that imposes a selected-tick wall-clock budget on its decorated subtree. If the elapsed time since the subtree became active reaches the configured budget while a descendant is still Running, the decorator returns Timeout(typed reason for ).

Responsibilities:

  • Encode the timeout aggregation rule for the runtime tick job.
  • Provide the baked / token identity for cross-layer correspondence.

Does NOT:

  • Sample the wall clock; the tick job feeds in elapsed seconds so the rule remains pure and Burst-callable.
  • Cancel awaited externals; that is the runtime instance’s job when it sees the Timeout result.

C#
public const BitQuirky.Behavior.Baked.BakedNodeKind Kind = TimeLimit

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/TimeLimit.cs:48

Baked node kind a time limit bakes to.

C#
public const string NodeKindToken = "timelimit"

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/TimeLimit.cs:44-45

Kind token a time limit carries in authored graph source.

C#
public const int SecondsParameterId = 1723256298

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/TimeLimit.cs:55

Stable baked id of the authored wall-clock budget parameter, BehaviorNodeParameterTokens.Seconds. A node without one keeps a zero budget and never expires, exactly as before the parameter existed.

Decorate(BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)

Section titled “Decorate(BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)”
C#
public static BitQuirky.Behavior.Nodes.BehaviorNodeStatus Decorate(BitQuirky.Behavior.Nodes.BehaviorNodeStatus childStatus, float elapsedSeconds, float budgetSeconds)

Source declaration: Packages/io.bitquirky.behavior/Runtime/Nodes/Decorator/TimeLimit.cs:63-75

Reports Timeout when the decorated subtree is still running and elapsedSeconds has reached budgetSeconds; otherwise passes the child’s status through. Both times are in seconds, measured since the subtree became active, and a budget of zero or less never expires.

Source fingerprint: sha256:ad0983d00d773d882bc61865e18d8c5559e009d181e5891575cd7f262515b23e

Full-size image