DelayedDelegates

Author: David O'Donoghue (Trooper)

Description
DelayedDelegates is a centralised way of calling a function at a specific time whilst passing through a parameter.

This gets rid of the messy practice of storing a global variable when using Invoke.

Changes
29/05/2012 26/05/2012 22/05/2012 01/03/2012
 * Fixed issue with DelayedDelegates.Add(DelayedDelegateInt method, int param) throwing Index Out of Range error... caused by previous change :)
 * Added DelayedDelegates.Skip(DelayedDelegateInt method, int param, int skipFrames)
 * Added DelayedDelegates.RemoveAll
 * Added DelayedDelegates.Skip(DelayedDelegate method, int skipFrames) which lets you skip a number of frames instead of seconds, only made this for non parameter delegates as I'm lazy.
 * Added DelayedDelegates.RunAll function which runs every delayed delegate immediately
 * Added DelayedDelegates.Add(DelayedDelegate meoth, float delay, bool realTime) to use realtimesincestartup instead of fixed time (i reversed the previous change because it did let me pause correctly).

Usage
Create a function with either a int, float, string, Vector3, Vector2 or GameObject parameter and then call the following:

You can pass back your own parameters by inheriting from DelegateParameters like this: