Пример #1
0
    IEnumerator DestroySelf()
    {
        Destroy(polygonCollider);
        yield return(new WaitForSeconds(Random.Range(0f, 0.3f)));

        transform.parent = null;
        playerCombat.DecrementPolygonCount(this.gameObject);
        yield return(new WaitForSeconds(0.5f));

        Destroy(this.gameObject);
    }