mirror of
https://gitee.com/cssfw/EasyTools.git
synced 2026-03-28 03:51:36 +08:00
style: 清理未使用的引用并添加缩进
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NewXp.IniApi
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user