協程執行的函數的腳本必須爲啓用,即那個gameobject必須是不爲空而且沒有setactive爲false才能夠繼續調用,
所以當yield return new WaitForSeconds(1f);語句下面的不執行,很可能就是銷燬了物品或者是設爲false了。
PS:最好在調用之前:
if(m_transform == null || gameObject.activeSelf == false)
return;
StartCoroutine(Explosion());
這樣判斷一下。