Working gardener saveable behavior tree

This commit is contained in:
Michal Pikulski
2025-11-03 01:34:34 +01:00
parent 14416e141e
commit 3b7bc76757
23 changed files with 2373 additions and 61 deletions

View File

@@ -1,17 +1,9 @@
using Core;
using UnityEngine;
using Core.SaveLoad;
using Pixelplacement;
public class LawnMowerBehaviour : MonoBehaviour
public class LawnMowerBehaviour : SaveableStateMachine
{
private StateMachine stateMachineRef;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
stateMachineRef = GetComponent<StateMachine>();
}
public void mowerTouched()
{
Logging.Debug("Mower Touched");
@@ -20,6 +12,6 @@ public class LawnMowerBehaviour : MonoBehaviour
public void stateSwitch(string StateName)
{
Logging.Debug("State Switch to: " + StateName);
stateMachineRef.ChangeState(StateName);
ChangeState(StateName);
}
}