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