uBAD
A Behaviour and Decision library for Unity3D
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
BAD.Chance Class Reference

Only runs child if probability value is met. More...

Inheritance diagram for BAD.Chance:
BAD.Decorator BAD.Branch BAD.Node

Public Member Functions

override IEnumerator< NodeResultNodeTask ()
 
override string ToString ()
 
- Public Member Functions inherited from BAD.Decorator
override Branch Add (Node child)
 
- Public Member Functions inherited from BAD.Branch
override void Abort ()
 
- Public Member Functions inherited from BAD.Node
virtual void Apply (object[] arguments)
 
virtual T GetArg< T > (int index)
 
 Node ()
 
IEnumerator< NodeResultGetNodeTask ()
 
override string ToString ()
 

Public Attributes

float probability = 0.5f
 
- Public Attributes inherited from BAD.Branch
List< Nodechildren = new List<Node> ()
 
- Public Attributes inherited from BAD.Node
BADReactor reactor
 
bool enabled = true
 
NodeResult state = null
 
bool running = false
 
Branch parent = null
 
object[] arguments
 

Protected Member Functions

override void ResolveArguments ()
 
- Protected Member Functions inherited from BAD.Decorator
bool ChildIsMissing ()
 

Detailed Description

Only runs child if probability value is met.

Member Function Documentation

override IEnumerator<NodeResult> BAD.Chance.NodeTask ( )
inlinevirtual

Reimplemented from BAD.Node.

override void BAD.Chance.ResolveArguments ( )
inlineprotectedvirtual

Reimplemented from BAD.Node.

override string BAD.Chance.ToString ( )
inline

Member Data Documentation

float BAD.Chance.probability = 0.5f

The documentation for this class was generated from the following file: