using System; namespace ET { public interface IRegisterLSEntitySystem { void RegisterSystem(LSEntity entity); } [EnableMethod] public class LSEntity: Entity { public new K AddComponent(bool isFromPool = false) where K : LSEntity, IAwake, new() { return this.AddComponentWithId(this.GetId(), isFromPool); } public new K AddComponent(P1 p1, bool isFromPool = false) where K : LSEntity, IAwake, new() { return this.AddComponentWithId(this.GetId(), p1, isFromPool); } public new K AddComponent(P1 p1, P2 p2, bool isFromPool = false) where K : LSEntity, IAwake, new() { return this.AddComponentWithId(this.GetId(), p1, p2, isFromPool); } public new K AddComponent(P1 p1, P2 p2, P3 p3, bool isFromPool = false) where K : LSEntity, IAwake, new() { return this.AddComponentWithId(this.GetId(), p1, p2, p3, isFromPool); } [EnableAccessEntiyChild] public new T AddChild(bool isFromPool = false) where T : LSEntity, IAwake { return this.AddChildWithId(this.GetId(), isFromPool); } [EnableAccessEntiyChild] public new T AddChild(A a, bool isFromPool = false) where T : LSEntity, IAwake { return this.AddChildWithId(this.GetId(), a, isFromPool); } [EnableAccessEntiyChild] public new T AddChild(A a, B b, bool isFromPool = false) where T : LSEntity, IAwake { return this.AddChildWithId(this.GetId(), a, b, isFromPool); } [EnableAccessEntiyChild] public new T AddChild(A a, B b, C c, bool isFromPool = false) where T : LSEntity, IAwake { return this.AddChildWithId(this.GetId(), a, b, c, isFromPool); } protected override void RegisterSystem() { IRegisterLSEntitySystem iRegisterLsEntitySystem = (IRegisterLSEntitySystem)this.IScene; TypeSystems.OneTypeSystems oneTypeSystems = LSEntitySystemSingleton.Instance.GetOneTypeSystems(this.GetType()); if (oneTypeSystems == null) { return; } if (oneTypeSystems.QueueFlag[LSQueneUpdateIndex.LSUpdate]) { iRegisterLsEntitySystem.RegisterSystem(this); } } } }