/// <summary> /// 设置向Entity发送事件对象 /// </summary> /// <param name="sendEventToEntity"></param> public void SetSendEventToEntity(ISendEventToEntity sendEventToEntity) { m_SendEventToEntity = sendEventToEntity; }
public ComponentType CreateComponent <ComponentType, PropertyType>(PropertyType property, ComponentEventDispatcher entityEventDispatcher, ISendEventToEntity sendEventToEntity) where ComponentType : EntityComponent <PropertyType>, new() { ComponentType component = new ComponentType(); component.SetEntityEventDispatcher(entityEventDispatcher); component.SetHashCode <ComponentType>(); component.OnInitialize(property); component.OnAddListener(); return(component); }