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("<color=red>天降大任于斯人也 必先苦其心志 饿其体肤 空乏其身 行拂乱其所为</color>");
}
}