private void TryStopMotion(MotionState motion) { if (motion.IsActive) { motion.StopMotion(false); } }
public void SetMotionEnabled(string name, bool state) { MotionState motion = GetMotion(name); if (motion != null) { motion.enabled = state; if (!state) { motion.StopMotion(true); } } }