EventManager Fixed

This commit is contained in:
hyunwoo 2023-08-16 19:44:41 +09:00
parent 84e34e84fd
commit 334eafb8c7

View File

@ -34,7 +34,7 @@ namespace FirstVillain.Event
if (_delegateDict.TryGetValue(type, out EventDelegate tempDelegate)) if (_delegateDict.TryGetValue(type, out EventDelegate tempDelegate))
{ {
tempDelegate -= targetDelegate; tempDelegate -= targetDelegate;
if (tempDelegate.GetInvocationList().Length == 0) if (tempDelegate == null)
{ {
_delegateDict.Remove(type); _delegateDict.Remove(type);
} }