void Start() { stateMachine = new StateMachine(this); stateMachine.AddState(new GameplayState(this), false); //add starting state }
// Use this for initialization void Start() { _stateMachine = new StateMachine(this); _stateMachine.AddState(new MovingState(this), false); //add starting state }