예제 #1
0
파일: NfBuff.cs 프로젝트: wenhu2010/mygame
 public void AddEvent(float time, GameEvent.Func f)
 {
     if (time > 0f)
     {
         StartCoroutine(DelayInvoke(time, f));
     }
     else
     {
         f();
     }
 }
예제 #2
0
파일: NfBuff.cs 프로젝트: wenhu2010/mygame
    IEnumerator DelayInvoke(float time, GameEvent.Func f)
    {
        yield return(new WaitForSeconds(time));

        try
        {
            f();
        }
        catch (KeyNotFoundException e)
        {
            Debug.LogError("buff(" + id + ") " + e.Message);
            Debug.LogError(e.StackTrace);
            MessageBox.Show("buff param error", "buff(" + id + ") " + e.Message);
        }
    }
예제 #3
0
파일: NfBuff.cs 프로젝트: wenhu2010/mygame
 public void AddEvent(float time, GameEvent.Func f, int count)
 {
     StartCoroutine(DelayInvokeRepeating(time, f, count));
 }