Show / Hide Table of Contents

Class BehaviorFactory<T>

Inheritance
System.Object
BehaviorFactory<T>
BT
Namespace: Eco.Simulation.Agents.AI
Assembly: Eco.Simulation.dll
Syntax
public class BehaviorFactory<T> : Object where T : IBehaviorControlled
Type Parameters
Name Description
T

Constructors

BehaviorFactory()

Declaration
public BehaviorFactory()

Methods

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

Declaration
public static Behavior<T> If(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
Returns
Type Description
Behavior<T>

Random(String, Behavior<T>[])

Declaration
public static Behavior<T> Random(string name, params Behavior<T>[] list)
Parameters
Type Name Description
System.String name
Behavior<T>[] list
Returns
Type Description
Behavior<T>

Random(String, (Behavior<T>, Single)[])

Declaration
public static Behavior<T> Random(string name, params (Behavior<T>, float)[] weightedList)
Parameters
Type Name Description
System.String name
System.ValueTuple<Behavior<T>, System.Single>[] weightedList
Returns
Type Description
Behavior<T>

Selector(String, Behavior<T>[])

Declaration
public static Behavior<T> Selector(string name, params Behavior<T>[] list)
Parameters
Type Name Description
System.String name
Behavior<T>[] list
Returns
Type Description
Behavior<T>

Sequence(String, Behavior<T>[])

Declaration
public static Behavior<T> Sequence(string name, params Behavior<T>[] list)
Parameters
Type Name Description
System.String name
Behavior<T>[] list
Returns
Type Description
Behavior<T>

Success(String, Action<T>)

Declaration
public static Behavior<T> Success(string name, Action<T> action)
Parameters
Type Name Description
System.String name
System.Action<T> action
Returns
Type Description
Behavior<T>
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾