Skip to content

Instantly share code, notes, and snippets.

View seekeroftheball's full-sized avatar
🎮
New GitHub Video Comes Out on Wednesday Oct 4 on YouTube!

seekeroftheball

🎮
New GitHub Video Comes Out on Wednesday Oct 4 on YouTube!
View GitHub Profile
@seekeroftheball
seekeroftheball / ObjectPool.cs
Created April 26, 2023 13:32
An object pool that uses multithreading to handle concurrent access to the pool.
//Author : https://github.com/seekeroftheball https://gist.github.com/seekeroftheball
//Version : 1.0
//Updated : April 2023
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
/// <summary>
@seekeroftheball
seekeroftheball / FindMax.cs
Last active April 26, 2023 13:46
FindMax for a variable number of parameters of any IComparable type, returns the largest value from the provided parameters.
// using System;
// using System.Linq;
/// <summary>
/// Find the maximum value from a variable number of parameters of any IComparable type.
/// </summary>
/// <typeparam name="T">Type of paramaters to compare.</typeparam>
/// <param name="max">Variable number of parameters of any type that implements the IComparable<T> interface.</param>
/// <returns>The largest value from the provided parameters.</returns>
public T FindMax<T>(params T[] max) where T : IComparable<T>
@seekeroftheball
seekeroftheball / Emoji.cs
Last active June 28, 2023 07:12
Lightweight static emoji library for the Unity Game Engine. Returns strings usable in the editor and in games.
//Author : https://github.com/seekeroftheball https://gist.github.com/seekeroftheball
//Version : 1.1
//Updated : March 2023
using System.Collections.Generic;
namespace Seeker.Emojis
{
/// <summary>
/// Lightweight static emoji library.
/// <para/>Note: Not all emojis will function in all parts of the Unity editor.