Class UtilityAction
The base implementation for Utility Action to be used by the planner.
See the interface IUtilityAction for detailed comments.
Inheritance
UtilityAction
Assembly: UtilityAIFramework.dll
Syntax
public abstract class UtilityAction : MonoBehaviour, IUtilityAction
Fields
Considerations
Declaration
public List<Consideration> Considerations
Field Value
Events
Declaration
public UtilityAction.ActionEvents Events
Field Value
MinScore
Declaration
Field Value
MoveData
Declaration
public ActionMoveData MoveData
Field Value
Name
Declaration
Field Value
Declaration
public ActionPerformData PerformData
Field Value
PropertySet
Declaration
public PropertySetRuntime PropertySet
Field Value
State
Declaration
public EActionStatus State
Field Value
Weight
Declaration
Field Value
Properties
Agent
Declaration
public Agent Agent { get; }
Property Value
FoldOutEnabled
Declaration
public bool FoldOutEnabled { get; set; }
Property Value
Initialized
Declaration
public bool Initialized { get; set; }
Property Value
Declaration
public bool ReachedPerformDuration { get; }
Property Value
Score
Declaration
public float Score { get; }
Property Value
TimeWatch
Declaration
public virtual TimeWatcher TimeWatch { get; }
Property Value
Methods
AddConsideration(Consideration)
Declaration
public void AddConsideration(Consideration consideration)
Parameters
InitializeDynamicConsideration()
Declaration
public virtual void InitializeDynamicConsideration()
IsAvailable()
Declaration
public virtual bool IsAvailable()
Returns
OnConsiderationCheck(Consideration)
Declaration
public virtual void OnConsiderationCheck(Consideration consideration)
Parameters
OnMove(MoveSystemBase)
Declaration
public virtual void OnMove(MoveSystemBase moveSystem)
Parameters
OnMoveStarted(MoveSystemBase)
Declaration
public virtual void OnMoveStarted(MoveSystemBase moveSystem)
Parameters
Called when Perform By Duration is completed.
Override this to execute code after it completes.
Declaration
protected virtual void OnPerformByDurationCompleted(Agent agent)
Parameters
Type |
Name |
Description |
Agent |
agent |
|
OnReachedDestination()
Declaration
public virtual void OnReachedDestination()
Declaration
public abstract EActionStatus Perform(Agent agent)
Parameters
Type |
Name |
Description |
Agent |
agent |
|
Returns
While the running elapsed has not reached action perform duration, it'll return Running and keep the action continuing.
Pass in any method group to be called on complete.
Declaration
protected EActionStatus PerformByDuration(Agent agent)
Parameters
Type |
Name |
Description |
Agent |
agent |
|
Returns
RemoveConsideration(Consideration)
Declaration
public void RemoveConsideration(Consideration consideration)
Parameters
SetScore(Single)
Declaration
public virtual void SetScore(float score)
Parameters
Type |
Name |
Description |
Single |
score |
|
SetState(EActionStatus)
Declaration
public void SetState(EActionStatus state)
Parameters
Setup(Agent)
Declaration
public virtual void Setup(Agent agent)
Parameters
Type |
Name |
Description |
Agent |
agent |
|
Explicit Interface Implementations
IUtilityAction.Considerations
Declaration
List<Consideration> IUtilityAction.Considerations { get; }
Returns
IUtilityAction.Events
Declaration
UtilityAction.ActionEvents IUtilityAction.Events { get; }
Returns
IUtilityAction.MoveData
Declaration
ActionMoveData IUtilityAction.MoveData { get; }
Returns
IUtilityAction.Name
Declaration
string IUtilityAction.Name { get; }
Returns
IUtilityAction.PropertySet
Declaration
PropertySetRuntime IUtilityAction.PropertySet { get; }
Returns
IUtilityAction.State
Declaration
EActionStatus IUtilityAction.State { get; }
Returns
IUtilityAction.Weight
Declaration
float IUtilityAction.Weight { get; }
Returns
Implements