|
|
|
@ -473,31 +473,6 @@ namespace QFrameworkCP
@@ -473,31 +473,6 @@ namespace QFrameworkCP
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class UnRegisterOnDestroyTrigger |
|
|
|
|
{ |
|
|
|
|
private readonly HashSet<IUnRegister> mUnRegisters = new HashSet<IUnRegister>(); |
|
|
|
|
|
|
|
|
|
public void AddUnRegister(IUnRegister unRegister) |
|
|
|
|
{ |
|
|
|
|
mUnRegisters.Add(unRegister); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void RemoveUnRegister(IUnRegister unRegister) |
|
|
|
|
{ |
|
|
|
|
mUnRegisters.Remove(unRegister); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void OnDestroy() |
|
|
|
|
{ |
|
|
|
|
foreach (var unRegister in mUnRegisters) |
|
|
|
|
{ |
|
|
|
|
unRegister.UnRegister(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mUnRegisters.Clear(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class TypeEventSystem |
|
|
|
|
{ |
|
|
|
|
private readonly EasyEvents mEvents = new EasyEvents(); |
|
|
|
|