public void CauseProcessingCompleted(ISystemContext context, uint causeId)
{
// get the transition.
uint transitionId = GetTransitionForCause(context, causeId);
if (transitionId == 0)
{
return;
}
// get the new state.
uint newState = GetNewStateForTransition(context, transitionId);
if (newState == 0)
{
return;
}
// save the last state.
if (m_lastState == null)
{
m_lastState = new FiniteStateVariableState(this);
}
m_lastState.SetChildValue(context, null, CurrentState, false);
// update state and transition variables.
UpdateStateVariable(context, newState, CurrentState);
UpdateTransitionVariable(context, transitionId, LastTransition);
}