Пример #1
0
    IEnumerator Disperse(float waitTime)
    {
        yield return(new WaitForSeconds(waitTime));

        if (materializer != null)
        {
            materializer.Disperse();
            Destroy(gameObject, 5f);
        }
    }
Пример #2
0
    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);
                }
            }
        }
    }