public static Timeout setTimeout(float time, customFunc callback) { Timeout timer = new Timeout(); timer.callback = callback; timer.time = time; timers.Add(timer); return(timer); }
public event EventHandler <double> OnCalculate; // An Event of when a mission is activated /// <summary> /// constructor /// </summary> /// <param name="calcFunc">function to calculate with</param> /// <param name="name">the name of the mission</param> public SingleMission(customFunc calcFunc, string name) { calculateFunc = calcFunc; Name = name; Type = TypeString; }
public static void timeout(float time, customFunc callback) { Timeout.setTimeout(time, callback); }
public static Interval interval(float time, customFunc callback) { Interval timer = new Interval(time, callback); return(timer); }
public Interval(float time, customFunc callback) { this.callback = callback; this.time = time; timers.Add(this); }
/// <summary> /// add another function to calculate with /// </summary> /// <param name="func">function to add</param> /// <returns>the Composed mission object (that you can use it again)</returns> public ComposedMission Add(customFunc func) { list.Add(func); return(this); }