void Start () {

//2秒后 每隔3秒 执行 PPP方法

InvokeRepeating("PPP", 2.0f, 3f);

}


void PPP()

{

print ("ssss");

}


void Update()

{

//按下左键时 取消调用InvokeRepeating

if(Input.GetMouseButtonDown(0))

{

CancelInvoke("PPP");

}

}