ai优化3
This commit is contained in:
parent
902c2991ec
commit
f4b73f64fc
@ -34,7 +34,7 @@ namespace Wpf_AiSportsMicrospace.Common
|
|||||||
private readonly CalcBaseRule _raiseLeftHandRule;
|
private readonly CalcBaseRule _raiseLeftHandRule;
|
||||||
private int _leftWaveCount = 0;
|
private int _leftWaveCount = 0;
|
||||||
private int _rightWaveCount = 0;
|
private int _rightWaveCount = 0;
|
||||||
private const int WaveThreshold = 4;
|
private const int WaveThreshold = 2;
|
||||||
WebcamClient _webcamClient;
|
WebcamClient _webcamClient;
|
||||||
|
|
||||||
private DateTime? _wristStartTime = null;
|
private DateTime? _wristStartTime = null;
|
||||||
|
|||||||
@ -23,7 +23,7 @@ namespace Wpf_AiSportsMicrospace.MyUserControl
|
|||||||
private const double CardWidth = 368;
|
private const double CardWidth = 368;
|
||||||
private const double CardHeight = 534;
|
private const double CardHeight = 534;
|
||||||
private const double CardGap = 30; // 卡片之间水平间距
|
private const double CardGap = 30; // 卡片之间水平间距
|
||||||
private const double SlideDurationMs = 380; // 动画时长
|
private const double SlideDurationMs = 300; // 动画时长
|
||||||
private const double ProgressDurationMs = 2600;
|
private const double ProgressDurationMs = 2600;
|
||||||
|
|
||||||
public int SelectedIndex
|
public int SelectedIndex
|
||||||
|
|||||||
@ -34,7 +34,7 @@ namespace Wpf_AiSportsMicrospace
|
|||||||
private WavingAction _lastGestureAction = WavingAction.None;
|
private WavingAction _lastGestureAction = WavingAction.None;
|
||||||
private DateTime _lastMenuSlideTime = DateTime.MinValue;
|
private DateTime _lastMenuSlideTime = DateTime.MinValue;
|
||||||
private bool _isNavigating;
|
private bool _isNavigating;
|
||||||
private const int MenuSlideCooldownMs = 520;
|
private const int MenuSlideCooldownMs = 320;
|
||||||
|
|
||||||
public Home()
|
public Home()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -60,8 +60,6 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
|
|||||||
public MusicJumpRope()
|
public MusicJumpRope()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Loaded += UserControl_Loaded;
|
|
||||||
Unloaded += UserControl_Unloaded;
|
|
||||||
_musicJumpRopeContext = new MusicJumpRopeContext();
|
_musicJumpRopeContext = new MusicJumpRopeContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,7 +225,12 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
|
|||||||
private DateTime _lastUpdateTime = DateTime.Now;
|
private DateTime _lastUpdateTime = DateTime.Now;
|
||||||
private async void StartCountdown(int start = 4)
|
private async void StartCountdown(int start = 4)
|
||||||
{
|
{
|
||||||
tipImage.Visibility = Visibility.Hidden;
|
if (_isCountdownStarted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (tipImage != null)
|
||||||
|
tipImage.Visibility = Visibility.Hidden;
|
||||||
|
|
||||||
_mainWin.ShowCountDownAnimation();
|
_mainWin.ShowCountDownAnimation();
|
||||||
_isCountdownStarted = true;
|
_isCountdownStarted = true;
|
||||||
_currentCountdown = start;
|
_currentCountdown = start;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user