/// <summary>Check whether the state needs to execute a transition.</summary> public FSMStateNode Check() { // Make sure we have a valid variable and connection. if (!_isConnected || _isValidVariable) { return(null); } // Execute check. bool check = InternalCheck(); // Return state considering negate value. return((check && !_negate) || (!check && _negate) ? _exit.GetState() : null); }