Browse Source

删除Unity依赖,作为独立副本使用

master
DESKTOP-B25GA9E\W35 2 years ago
parent
commit
94d0a53e70
  1. 20
      Assets/MsgTransmitTools/src/QFrameCopy.cs

20
Assets/MsgTransmitTools/src/QFrameCopy.cs

@ -22,7 +22,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine;
namespace QFrameworkCP namespace QFrameworkCP
{ {
@ -474,7 +473,7 @@ namespace QFrameworkCP
} }
} }
public class UnRegisterOnDestroyTrigger : MonoBehaviour public class UnRegisterOnDestroyTrigger
{ {
private readonly HashSet<IUnRegister> mUnRegisters = new HashSet<IUnRegister>(); private readonly HashSet<IUnRegister> mUnRegisters = new HashSet<IUnRegister>();
@ -499,23 +498,6 @@ namespace QFrameworkCP
} }
} }
public static class UnRegisterExtension
{
public static IUnRegister UnRegisterWhenGameObjectDestroyed(this IUnRegister unRegister, GameObject gameObject)
{
var trigger = gameObject.GetComponent<UnRegisterOnDestroyTrigger>();
if (!trigger)
{
trigger = gameObject.AddComponent<UnRegisterOnDestroyTrigger>();
}
trigger.AddUnRegister(unRegister);
return unRegister;
}
}
public class TypeEventSystem public class TypeEventSystem
{ {
private readonly EasyEvents mEvents = new EasyEvents(); private readonly EasyEvents mEvents = new EasyEvents();

Loading…
Cancel
Save