Class BehaviorKnowledgeSelector<T>
Behavior knowledge value selector that can reference blackboard item, behavior goal or sensor values.
Inheritance
Implements
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[CustomEditor]
public sealed class BehaviorKnowledgeSelector<T> : ValueType, IComparable, IComparable<BehaviorKnowledgeSelectorAny>, IComparable<BehaviorKnowledgeSelector<T>>
Type Parameters
T
|
Constructors
BehaviorKnowledgeSelector(BehaviorKnowledgeSelectorAny)
Initializes a new instance of the BehaviorKnowledgeSelector<T> structure.
Declaration
public BehaviorKnowledgeSelector(BehaviorKnowledgeSelectorAny other)
Parameters
BehaviorKnowledgeSelectorAny
other
The other selector. |
BehaviorKnowledgeSelector(String)
Initializes a new instance of the BehaviorKnowledgeSelector<T> structure.
Declaration
public BehaviorKnowledgeSelector(string path)
Parameters
System.String
path
The selector path. |
Fields
Path
Selector path that redirects to the specific knowledge value.
Declaration
public string Path
Field Value
System.String
|
Methods
CompareTo(BehaviorKnowledgeSelector<T>)
Declaration
public int CompareTo(BehaviorKnowledgeSelector<T> other)
Parameters
BehaviorKnowledgeSelector<T>
other
|
Returns
System.Int32
|
CompareTo(BehaviorKnowledgeSelectorAny)
Declaration
public int CompareTo(BehaviorKnowledgeSelectorAny other)
Parameters
BehaviorKnowledgeSelectorAny
other
|
Returns
System.Int32
|
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
System.Object
obj
|
Returns
System.Int32
|
Get(BehaviorKnowledge)
Gets the selected knowledge value.
Declaration
public T Get(BehaviorKnowledge knowledge)
Parameters
BehaviorKnowledge
knowledge
The knowledge container to access. |
Returns
T
The output value or null (if cannot read it - eg. missing goal or no blackboard entry of that name). |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
System.Int32
|
Set(BehaviorKnowledge, T)
Sets the selected knowledge value.
Declaration
public bool Set(BehaviorKnowledge knowledge, T value)
Parameters
BehaviorKnowledge
knowledge
The knowledge container to access. |
T
value
The value to set. |
Returns
System.Boolean
True if set value value, otherwise false. |
ToString()
Declaration
public override string ToString()
Returns
System.String
|
TryGet(BehaviorKnowledge, out T)
Tries to get the selected knowledge value. Returns true if got value, otherwise false.
Declaration
public bool TryGet(BehaviorKnowledge knowledge, out T value)
Parameters
BehaviorKnowledge
knowledge
The knowledge container to access. |
T
value
The output value. |
Returns
System.Boolean
True if got value, otherwise false. |
Operators
Implicit(BehaviorKnowledgeSelector<T> to String)
Implicit cast operator from selector to string.
Declaration
public static implicit operator string (BehaviorKnowledgeSelector<T> value)
Parameters
BehaviorKnowledgeSelector<T>
value
Selector |
Returns
System.String
Path |
Implicit(String to BehaviorKnowledgeSelector<T>)
Implicit cast operator from string to selector.
Declaration
public static implicit operator BehaviorKnowledgeSelector<T>(string value)
Parameters
System.String
value
Path |
Returns
BehaviorKnowledgeSelector<T>
Selector |