Add most of research

This commit is contained in:
Bram verhulst
2025-05-31 15:54:23 +02:00
commit 70f128f092
270 changed files with 80847 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class Robot : AI_Agent {
[SerializeField] TextMeshProUGUI _currentStatePrint;
// Start is called before the first frame update
protected override void Start()
{
base.Start();
SubGoal s1 = new SubGoal("TreatPatient", 1, false);
goals.Add(s1, 3);
var s2 = new SubGoal("Charged", 1, false);
goals.Add(s2, 5);
Invoke(nameof(GetDepleted), Random.Range(10, 20));
}
private void Update()
{
if (_currentStatePrint != null && planner != null && currentAction != null)
{
// _currentStatePrint.text = "Nurse 1 Action: " + currentAction.actionName + "\n" + planner.GetPlanString();
_currentStatePrint.text =
"Nurse 1 Action: " + currentAction.actionName + "\n" + planner.GetPlanDescription();
}
}
void GetDepleted()
{
agentWorldStates.ModifyState("Depleted", 0);
Invoke(nameof(GetDepleted), Random.Range(10, 20));
}
}