Interface IGoapAgentStates
The
AgentStates
define the world of an agent in specific aspects which is used for planning with the
GOAP algorithm.
Namespace: Mars.Components.Services.Planning
Assembly: Mars.Components.dll
Syntax
public interface IGoapAgentStates
Properties
| Improve this Doc View SourceStates
These states are part of the bigger picture.
Combining the agents states with the world
states creates the "whole truth"
Declaration
Dictionary<IGoapStateKey, GoapStateProperty> States { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<IGoapStateKey, GoapStateProperty> |
Methods
| Improve this Doc View SourceAddOrUpdateState(GoapStateProperty)
Adds a state property to this agentStates or updates an existing property with the same key.
Declaration
void AddOrUpdateState(GoapStateProperty state)
Parameters
Type | Name | Description |
---|---|---|
GoapStateProperty | state | Defines a specific aspect of the world. |
AddOrUpdateState<T>(GoapStateKey<T>, T)
Adds a state property to this agentStates or updates an existing property with the same key.
Declaration
void AddOrUpdateState<T>(GoapStateKey<T> key, T value)
Parameters
Type | Name | Description |
---|---|---|
GoapStateKey<T> | key | Identifies the state property. |
T | value | The specific manifestation of this state. |
Type Parameters
Name | Description |
---|---|
T | The type of value. |
RemoveState(GoapStateProperty)
Removes a state property.
Declaration
void RemoveState(GoapStateProperty state)
Parameters
Type | Name | Description |
---|---|---|
GoapStateProperty | state | The state property that should be removed. |
RemoveState(IGoapStateKey)
Removes a state property with given key.
Declaration
void RemoveState(IGoapStateKey stateKey)
Parameters
Type | Name | Description |
---|---|---|
IGoapStateKey | stateKey | Identifies the state property that should be removed. |