Working gardener saveable behavior tree
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user