Class BehaviorFactory<T>
Inheritance
System.Object
BehaviorFactory<T>
Assembly: Eco.Simulation.dll
Syntax
public class BehaviorFactory<T> : Object where T : IBehaviorControlled
Type Parameters
Constructors
BehaviorFactory()
Declaration
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
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
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
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
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
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