Add most of research
This commit is contained in:
23
GOAP/Assets/Scrips/Actions/GetTreated.cs
Normal file
23
GOAP/Assets/Scrips/Actions/GetTreated.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
public class GetTreated : AI_Action
|
||||
{
|
||||
public override bool PrePerform()
|
||||
{
|
||||
target = inventory.FindItemWithTag("Bed");
|
||||
if(target == null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool PostPerform()
|
||||
{
|
||||
AI_World.Instance.GetWorld().ModifyState("Treated", 1);
|
||||
agentWorldStates.ModifyState("IsCured", 1);
|
||||
inventory.RemoveItem(target);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user