音乐
This commit is contained in:
parent
b07c131ff6
commit
586419fbe0
@ -64,8 +64,9 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
|
||||
};
|
||||
|
||||
private List<TextBlock> _musicBeatTextBlock = new List<TextBlock>();
|
||||
|
||||
// 容忍时间(节拍误差)
|
||||
public double _beatTolerance = 0.15; // ±150ms
|
||||
public double _beatTolerance = 0.25; // ±150ms
|
||||
|
||||
public MusicJumpRope()
|
||||
{
|
||||
@ -252,11 +253,8 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
|
||||
{
|
||||
countdownText.Text = "GO!";
|
||||
countdownGrid.Visibility = Visibility.Hidden;
|
||||
|
||||
// 播放背景音乐(循环)
|
||||
Utils.PlayBackgroundMusic("1.MP3", true);
|
||||
// 启动60秒倒计时(独立任务)
|
||||
StartGameCountdown(108);
|
||||
StartGameCountdown(105);
|
||||
}
|
||||
|
||||
private async void StartGameCountdown(int seconds)
|
||||
@ -265,6 +263,9 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
|
||||
|
||||
countdownGrid.Visibility = Visibility.Visible;
|
||||
|
||||
// 播放背景音乐(循环)
|
||||
Utils.PlayBackgroundMusic("1.MP3", true);
|
||||
|
||||
for (int i = seconds; i >= 0; i--)
|
||||
{
|
||||
countdownText.Text = i.ToString();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user