Class BehaviorRandom<T>
Executes a random child under us by weight. Returns running if the child is running.
Inheritance
System.Object
BehaviorRandom<T>
Assembly: Eco.Simulation.dll
Syntax
public class BehaviorRandom<T> : BehaviorTree<T> where T : IBehaviorControlled
Type Parameters
Constructors
BehaviorRandom(String, IEnumerable<(Behavior<T>, Single)>)
Declaration
public BehaviorRandom(string name, IEnumerable<(Behavior<T>, float)> children)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Collections.Generic.IEnumerable<System.ValueTuple<Behavior<T>, System.Single>> |
children |
|
Methods
Do(T)
Declaration
public override BTStatus Do(T context)
Parameters
Type |
Name |
Description |
T |
context |
|
Returns
Overrides
Eco.Simulation.Agents.AI.Behavior<T>.Do(T)