ss
This commit is contained in:
parent
68b5ad8c1e
commit
20c62d9927
@ -350,10 +350,9 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
|
|
||||||
private void UpdateCircleCounts(List<Human> humans)
|
private void UpdateCircleCounts(List<Human> humans)
|
||||||
{
|
{
|
||||||
lock (_updateLock)
|
|
||||||
{
|
|
||||||
double radiusNormX = 0.07;
|
double radiusNormX = 0.07;
|
||||||
double radiusNormY = 0.07;
|
double radiusNormY = 0.14;
|
||||||
|
|
||||||
for (int i = 0; i < circlePositions.Count; i++)
|
for (int i = 0; i < circlePositions.Count; i++)
|
||||||
{
|
{
|
||||||
@ -390,12 +389,14 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
|
|
||||||
// 根据是否有人和跳绳数字判断状态
|
// 根据是否有人和跳绳数字判断状态
|
||||||
bool hasHuman = humanInCircle != null;
|
bool hasHuman = humanInCircle != null;
|
||||||
|
lock (_updateLock)
|
||||||
|
{
|
||||||
userList[i].ImageState = GetJumpState(i, hasHuman);
|
userList[i].ImageState = GetJumpState(i, hasHuman);
|
||||||
|
|
||||||
// 推送计数
|
|
||||||
if (hasHuman)
|
|
||||||
sports[i].Pushing(humanInCircle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 推送计数
|
||||||
|
if (hasHuman)
|
||||||
|
sports[i].Pushing(humanInCircle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +427,7 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
|
|
||||||
// 数字未变化,判断是否超过 2 秒
|
// 数字未变化,判断是否超过 2 秒
|
||||||
double elapsed = (DateTime.Now - lastChangeTime).TotalSeconds;
|
double elapsed = (DateTime.Now - lastChangeTime).TotalSeconds;
|
||||||
if (elapsed >= 3)
|
if (elapsed >= 2)
|
||||||
{
|
{
|
||||||
// 超过 2 秒未变化 → 停止
|
// 超过 2 秒未变化 → 停止
|
||||||
_jumpStatus[circleIndex] = (currentNumber, lastChangeTime, "1");
|
_jumpStatus[circleIndex] = (currentNumber, lastChangeTime, "1");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user