Show / Hide Table of Contents

Class BehaviorConditional<T>

Executes a child behavior based on a condition.

Inheritance
System.Object
Behavior<T>
GenericBehavior<T>
BehaviorConditional<T>
Inherited Members
GenericBehavior<T>.Name
Behavior<T>.Fail(IBehaviorControlled, String)
Behavior<T>.Success(IBehaviorControlled, String)
Behavior<T>.RunningChanged(IBehaviorControlled, String)
Behavior<T>.RunningUnchanged(IBehaviorControlled, String)
Behavior<T>.Fail(IBehaviorControlled, Func<String>)
Behavior<T>.Success(IBehaviorControlled, Func<String>)
Behavior<T>.RunningChanged(IBehaviorControlled, Func<String>)
Behavior<T>.RunningUnchanged(IBehaviorControlled, Func<String>)
Behavior<T>.Fail(IBehaviorControlled)
Behavior<T>.Success(IBehaviorControlled)
Behavior<T>.RunningChanged(IBehaviorControlled)
Behavior<T>.RunningUnchanged(IBehaviorControlled)
Behavior<T>.Status(Boolean, IBehaviorControlled, String, String)
Behavior<T>.Status(BTStatus, IBehaviorControlled)
Behavior<T>.Status(BTStatus, IBehaviorControlled, String)
Behavior<T>.Status(BTStatus, IBehaviorControlled, Func<String>)
Namespace: Eco.Simulation.Agents.AI
Assembly: Eco.Simulation.dll
Syntax
public class BehaviorConditional<T> : GenericBehavior<T> where T : IBehaviorControlled
Type Parameters
Name Description
T

Constructors

BehaviorConditional(String, Func<T, (Boolean, String)>, Behavior<T>[])

Declaration
public BehaviorConditional(string name, Func<T, (bool, string)> condition, params Behavior<T>[] children)
Parameters
Type Name Description
System.String name
System.Func<T, System.ValueTuple<System.Boolean, System.String>> condition
Behavior<T>[] children

Fields

Condition

Declaration
public readonly Func<T, (bool, string)> Condition
Field Value
Type Description
System.Func<T, System.ValueTuple<System.Boolean, System.String>>

Properties

ChildrenBehaviors

Declaration
public override IEnumerable<Behavior<T>> ChildrenBehaviors { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<Behavior<T>>
Overrides
Eco.Simulation.Agents.AI.Behavior<T>.ChildrenBehaviors

Methods

Do(T)

Declaration
public override BTStatus Do(T context)
Parameters
Type Name Description
T context
Returns
Type Description
BTStatus
Overrides
Eco.Simulation.Agents.AI.Behavior<T>.Do(T)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾