Click or drag to resize
Composite Class
The base class of the entire behavior tree system. Nearly all branches derive from this class.
Inheritance Hierarchy

Namespace: Styx.TreeSharp
Assembly: Styx.TreeSharp (in Styx.TreeSharp.dll) Version: 3.0.1160.0 (3.0.1160)
Syntax
C#
public abstract class Composite : IEquatable<Composite>

The Composite type exposes the following members.

Constructors
  NameDescription
Protected methodComposite
Initializes a new instance of the Composite class
Top
Properties
  NameDescription
Protected propertyCleanupHandlers
Protected propertyContextChanger
Public propertyGuid
Gets a unique identifier.
Public propertyIsRunning
Returns true if the current behavior is running.
Public propertyLastStatus
Contains the execution status (if any) provided by the last Tick()
Public propertyParent
Gets or sets the parent.
Top
Methods
  NameDescription
Protected methodCleanup
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Overrides ObjectEquals(Object).)
Public methodEquals(Composite)
Indicates whether the current object is equal to another object of the same type.
Protected methodExecute
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStart
Initializes the Task into a runnable state by clearing the LastStatus (if any), clearing the cleanup handlers remaining (if any -- note that this may also trigger the IDisposable behavior of any remaining cleanup handlers on the cleanup stack), and reinitializing the execution enumerator.
Public methodStop
Stop will call all cleanup handlers!
Public methodTick
Executes the user code of the function, as expressed in Execute()
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Equality operator.
Public operatorStatic memberInequality
Inequality operator.
Top
Fields
  NameDescription
Protected fieldStatic memberLocker
Provides a lockable object so we can gain a mutex over the operations done in Tick(...)
Top
Extension Methods
  NameDescription
Public Extension MethodExecuteCoroutine
Executes the composite inside a coroutine.
(Defined by CoroutineCompositeExtensions.)
Top
See Also