协程执行的函数的脚本必须为启用,即那个gameobject必须是不为空而且没有setactive为false才能够继续调用,
所以当yield return new WaitForSeconds(1f);语句下面的不执行,很可能就是销毁了物品或者是设为false了。
PS:最好在调用之前:
if(m_transform == null || gameObject.activeSelf == false)
return;
StartCoroutine(Explosion());
这样判断一下。