private void OnLoopAllMotionsClick(object sender, RoutedEventArgs e) { if (model?.Motion != null) { OnStopLoop(null, null); var motions = model.Motion.Values.SelectMany(x => x).ToArray(); motionPlayer = new MotionPlayer(RenderView, motions); motionPlayer.Loop = true; motionPlayer.Begin(); } }
private void OnGroupLoop(object sender, RoutedEventArgs e) { if (model?.Motion != null && sender is MenuItem) { OnStopLoop(null, null); var menuItem = (MenuItem)sender; motionPlayer = model.CreatePlayer(RenderView, menuItem.Header.ToString()); motionPlayer.Loop = true; motionPlayer.Begin(); } }
private void OnLoopThisMotionsClick(object sender, RoutedEventArgs e) { if (model?.Motion != null) { OnStopLoop(null, null); var motion = GetMotion(ListMotion.SelectedItem.ToString()); if (motion != null) { motionPlayer = new MotionPlayer(RenderView, new L2DMotion[] { motion }); motionPlayer.Loop = true; motionPlayer.Begin(); } } }