|
@@ -3,25 +3,25 @@
|
|
[FriendOf(typeof(GameSessionKeyComponent))]
|
|
[FriendOf(typeof(GameSessionKeyComponent))]
|
|
public static class GameSessionKeyComponentSystem
|
|
public static class GameSessionKeyComponentSystem
|
|
{
|
|
{
|
|
- public static void Add(this GameSessionKeyComponent self, long key, string account)
|
|
|
|
|
|
+ public static void Add(this GameSessionKeyComponent self, string key, string account)
|
|
{
|
|
{
|
|
self.sessionKey.Add(key, account);
|
|
self.sessionKey.Add(key, account);
|
|
self.TimeoutRemoveKey(key).Coroutine();
|
|
self.TimeoutRemoveKey(key).Coroutine();
|
|
}
|
|
}
|
|
|
|
|
|
- public static string Get(this GameSessionKeyComponent self, long key)
|
|
|
|
|
|
+ public static string Get(this GameSessionKeyComponent self, string key)
|
|
{
|
|
{
|
|
string account = null;
|
|
string account = null;
|
|
self.sessionKey.TryGetValue(key, out account);
|
|
self.sessionKey.TryGetValue(key, out account);
|
|
return account;
|
|
return account;
|
|
}
|
|
}
|
|
|
|
|
|
- public static void Remove(this GameSessionKeyComponent self, long key)
|
|
|
|
|
|
+ public static void Remove(this GameSessionKeyComponent self, string key)
|
|
{
|
|
{
|
|
self.sessionKey.Remove(key);
|
|
self.sessionKey.Remove(key);
|
|
}
|
|
}
|
|
|
|
|
|
- private static async ETTask TimeoutRemoveKey(this GameSessionKeyComponent self, long key)
|
|
|
|
|
|
+ private static async ETTask TimeoutRemoveKey(this GameSessionKeyComponent self, string key)
|
|
{
|
|
{
|
|
await TimerComponent.Instance.WaitAsync(20000);
|
|
await TimerComponent.Instance.WaitAsync(20000);
|
|
self.sessionKey.Remove(key);
|
|
self.sessionKey.Remove(key);
|