Пример #1
0
    /// <summary>
    /// Wait some time before start some method
    /// </summary>
    /// <param name="seconds"></param>
    /// <param name="method"></param>
    /// <returns></returns>
    IEnumerator Wait(float seconds, someMethod method)
    {
        yield return(new WaitForSeconds(seconds));

        method();
    }
Пример #2
0
 // Constructor
 public Timer(someMethod method, int totalSeconds, int everyNSeconds)
 {
     this.method        = method;
     this.totalSeconds  = totalSeconds;
     this.everyNSeconds = everyNSeconds;
 }