自动callback

using UnityEngine;

public class AsyncCallbackScript : MonoBehaviour
{
    public delegate void fun(string msg);

    void Start()
    {
        fun test = AAA;
        //test.BeginInvoke("天王盖地虎", asyncCallback => BBB(), null);
        test.BeginInvoke("天王盖地虎 宝塔镇河妖", callback => BBB(), null);

    }
    public void AAA(string msg)
    {
        for (int i = 0; i < 20; i++)
        {
            Debug.Log(msg);
        }
    }

    public void BBB()
    {
        Debug.Log("天降大任于斯人也 必先苦其心志 饿其体肤 空乏其身 行拂乱其所为");
    }

}

自动callback_第1张图片

 

你可能感兴趣的:(java,前端,linux)