Example #1
0
        /// <summary>
        /// (Cross-Game compatible) Return this with the first Item of type TCast removed
        /// </summary>
        /// <typeparam name="TSource"></typeparam>
        /// <typeparam name="TCast">The Type of the Item you want to remove</typeparam>
        /// <param name="lockList"></param>
        /// <returns></returns>
        public static LockList <TSource> RemoveItemOfType <TSource, TCast>(this LockList <TSource> lockList)
            where TSource : Il2CppSystem.Object
            where TCast : Il2CppSystem.Object
        {
            var behavior = lockList.First(o => o.IsType <TCast>()).Cast <TCast>();

            return(RemoveItem(lockList, behavior));
        }