protected override bool Statement()
{
if (_townsfolkScript.townsfolkInitialState == InitialState.Idle)
if (_townsfolkScript.InitialState == InitialState.Idle)
// We don't want to consume it because we want the townsfolk to stay idle
return true;
if (_townsfolkScript.townsfolkInitialState == InitialState.Talk)
if (_townsfolkScript.InitialState == InitialState.Talk)
}
if (_townsfolkScript.townsfolkInitialState == InitialState.Walk)
if (_townsfolkScript.InitialState == InitialState.Walk)
public class Townsfolk : MonoBehaviour
public InitialState townsfolkInitialState; //This is checked by conditions in the StateMachine
public InitialState InitialState; //This is checked by conditions in the StateMachine
void Start()