private bool PopulateItem(TData item, int index, FilterDelegate filter, InitializeDelegate initializer, InstantiateDelegate instantiator ) { if (filter != null && !filter(item)) { return(false); } TComponent component; if (index < this.pool.Count) { component = this.pool[index]; } else { component = instantiator != null ? instantiator(this.prefab, this.root) : Object.Instantiate(this.prefab, this.root); this.pool.Add(component); } component.gameObject.SetActive(true); initializer?.Invoke(item, component); return(true); }
public override void PostInitialize(Harmony plibInstance) { doPostInitialize?.Invoke(plibInstance); }
internal override object DoInitialize(Harmony plibInstance) { doInitialize.Invoke(plibInstance); return(wrapped); }
public override void Bootstrap(Harmony plibInstance) { doBootstrap?.Invoke(plibInstance); }