private int GoToFall(int currentState, object o) { bool notHumanFall; TextBoxStreamWriter.DefaultLog.WriteLine("HAL9000.-> GoToFall state of SM_DetectPersonFall reached."); if (brain.GetCloseToHumanFall(out notHumanFall, 10000)) { TextBoxStreamWriter.DefaultLog.WriteLine("HAL9000.-> Getclose to human success."); finalState = FinalStates.OK; return((int)States.FinalState); } else { TextBoxStreamWriter.DefaultLog.WriteLine("HAL9000.-> Getclose to human FAILED"); if (!notHumanFall) { finalState = FinalStates.FallNotReached; } else { //brain.SayAsync("I have detected a fall in that direction."); //point at the direction of the fall //Thread.Sleep(1000); finalState = FinalStates.NoHumanFallDetected; } return((int)States.FinalState); } }