// ------------------------------------------------------------------ // Desc: // ------------------------------------------------------------------ public bool IsActiveState(State _state, bool _containsTransTarget = true) { if (inTransition && _containsTransTarget) { if (ReferenceEquals(currentTransition.target, _state)) { return(true); } } for (int i = 0; i < currentStates.Count; ++i) { State child = currentStates[i]; if (ReferenceEquals(child, _state)) { return(true); } if (child.IsActiveState(_state, _containsTransTarget)) { return(true); } } return(false); }