/// <summary> /// Initializes a new instance of the <see cref="EntityStore{T1,T2}"/> class. /// </summary> /// <param name="serializer">The serializer for handling serialization to <see cref="NativeLuaTable"/>.</param> /// <param name="savedDataHandler">Handler for the saving the data to global lua table.</param> /// <param name="entityUpdateSubscriptionCenter">Subscription center for updates to the data entity.</param> public EntityStore(ISerializer serializer, ISavedDataHandler savedDataHandler, IEntityUpdateSubscriptionCenter <T1, T2> entityUpdateSubscriptionCenter) { this.serializer = serializer; this.entities = new List <T1>(); this.savedDataHandler = savedDataHandler; this.entityUpdateSubscriptionCenter = entityUpdateSubscriptionCenter; }
/// <summary> /// Initializes a new instance of the <see cref="EntityStoreWithDefaults{T1,T2}"/> class. /// </summary> /// <param name="serializer">The serializer for handling serialization to <see cref="NativeLuaTable"/>.</param> /// <param name="savedDataHandler">Handler for the saving the data to global lua table.</param> public EntityStoreWithDefaults(ISerializer serializer, ISavedDataHandler savedDataHandler) : this(serializer, savedDataHandler, null) { }