style: 清理未使用的引用并添加缩进

This commit is contained in:
3cxc
2026-02-12 17:31:16 +08:00
parent 4570b966c4
commit c19d4c2f9f
16 changed files with 23 additions and 88 deletions

View File

@@ -7,8 +7,6 @@ using PlayerRoles;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Utils
{

View File

@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NewXp.IniApi
{

View File

@@ -1,12 +1,8 @@
using CustomPlayerEffects;
using EasyTools.Events;
using EasyTools.Events;
using LabApi.Features.Wrappers;
using MEC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace EasyTools.Utils
@@ -45,14 +41,14 @@ namespace EasyTools.Utils
_lastHealth[p] = lastHealth;
Vector3 pos = p.Position;
if(_lastMove.TryGetValue(p,out var last))
if (_lastMove.TryGetValue(p, out var last))
{
if (Vector3.Distance(pos,last.pos) < 0.1f)
if (Vector3.Distance(pos, last.pos) < 0.1f)
{
bool canceled = false;
// 检测是否正在受伤
if (_lastDamageTime.TryGetValue(p,out var lastDamageTime))
if (_lastDamageTime.TryGetValue(p, out var lastDamageTime))
{
if (DateTime.UtcNow - lastDamageTime < TimeSpan.FromSeconds(CustomEventHandler.Config.heal_atk_secend)) { canceled = true; }
}
@@ -68,8 +64,10 @@ namespace EasyTools.Utils
}
}
else { _lastMove[p] = (pos, DateTime.UtcNow); }
}else { _lastMove[p] = (pos, DateTime.UtcNow); }
}else if (_lastMove.ContainsKey(p)) { _lastMove.Remove(p); }
}
else { _lastMove[p] = (pos, DateTime.UtcNow); }
}
else if (_lastMove.ContainsKey(p)) { _lastMove.Remove(p); }
}
yield return Timing.WaitForSeconds(1f);
}

View File

@@ -3,9 +3,6 @@ using LabApi.Features.Wrappers;
using MEC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EasyTools.Utils
{