/// <summary> /// Performs the late update loop for the State. Also checks transitions if LATE_CHECK_TRANSITIONS is defined /// </summary> /// <param name="obj">A reference to the object</param> public void DoLateUpdate(ref T obj) { //Null catch/default catch. This is kind of redundant for structs but its necessary to avoid having to default/null catch in every state if (EqualityComparer <T> .Default.Equals(obj, default)) { return; } //Null catch again if (_current != null) { //Defines woo #if LATE_CHECK_TRANSITIONS //Do we need to make a global transition //Do we need to make a transition out of the current state if (CheckTransitions(ref ctrl, ref globalTransitions, null) || CheckTransitions(ref ctrl, ref current.transitions, current.ignoreTransition)) { //Swap the states SwapStates(ref ctrl); } #endif //Call the fixed update _current.State_Late(ref obj); } }