This commit is contained in:
sardelka9515
2022-10-23 19:02:39 +08:00
parent 6b34ab6e36
commit 2828b9b74f
114 changed files with 7374 additions and 7205 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using GTA.UI;
namespace RageCoop.Client
{
@ -18,33 +19,30 @@ namespace RageCoop.Client
CheckProjectiles,
GetAllEntities,
Receive,
ProjectilesTotal,
ProjectilesTotal
}
internal static class Debug
{
public static Dictionary<TimeStamp, long> TimeStamps = new Dictionary<TimeStamp, long>();
private static int _lastNfHandle;
static Debug()
{
foreach (TimeStamp t in Enum.GetValues(typeof(TimeStamp)))
{
TimeStamps.Add(t, 0);
}
foreach (TimeStamp t in Enum.GetValues(typeof(TimeStamp))) TimeStamps.Add(t, 0);
}
public static string Dump(this Dictionary<TimeStamp, long> d)
{
string s = "";
foreach (KeyValuePair<TimeStamp, long> kvp in d)
{
s += kvp.Key + ":" + kvp.Value + "\n";
}
var s = "";
foreach (var kvp in d) s += kvp.Key + ":" + kvp.Value + "\n";
return s;
}
public static void ShowTimeStamps()
{
GTA.UI.Notification.Hide(_lastNfHandle);
_lastNfHandle = GTA.UI.Notification.Show(Debug.TimeStamps.Dump());
Notification.Hide(_lastNfHandle);
_lastNfHandle = Notification.Show(TimeStamps.Dump());
}
}
}
}