IEnumerator Disperse(float waitTime) { yield return(new WaitForSeconds(waitTime)); if (materializer != null) { materializer.Disperse(); Destroy(gameObject, 5f); } }
public void Disperse() { if (!rb.isKinematic) { materializer.Disperse(); Debug.Log("dispersing"); int numSpears = stuckSpears.Count; for (int i = 0; i < numSpears; i++) { if (stuckSpears[i] != null) { stuckSpears[i].SetPhysical(true); } } } }