Code
Last updated
Last updated
Create a new scene
Create a new GameObject called Goap
, add the GoapRunnerBehaviour
to it.
Create a class called WanderTarget
that extends TargetKeyBase
.
Create a class called IsWandering
that extends WorldKeyBase
.
Create a class called GoapSetConfigFactory
that extends GoapSetConfigFactoryBase
and override the Create
method.
Add the GoapSetConfigFactory
to the Goap
GameObject. Make sure to add the GoapSetConfigFactory
to the GoapRunnerBehaviour
's factories property.
Create a script called GoapSetBinder
. This script will assign a GoapSet
to the Agent
.
Create a sphere GameObject
called Agent
. Add the AgentBehaviour
, AgentMoveBehaviour
, AgentBrain
and GoapSetBinder
to the GameObject
.
Run the scene. The agent should move around randomly.