using Entitas; using JNGame.Sync.System; using NotImplementedException = System.NotImplementedException; namespace JNGame.Sync.Entity.Component { /// /// 组件 /// public class JNComponent : IComponent,IJNSyncCycle { public IJNEntity Entity; public void OnInit(IJNEntity entity) { this.Entity = entity; } public T GetSystem() where T : SLogicSystem { return Entity.GetContext().GetSync().GetSystem(); } //生命周期 public virtual void OnSyncStart(){} public virtual void OnSyncUpdate(int dt){} public virtual void OnSyncDestroy(){} } }