コード例 #1
0
    private IEnumerator RemoveCasing()
    {
        //Destroy the casing after set amount of seconds
        yield return(new WaitForSeconds(despawnTime));

        //Destroy casing object
        poolObject.Return();
    }
コード例 #2
0
    private IEnumerator DestroyTimer()
    {
        yield return(new WaitForSeconds(Random.Range(minDestroyTime, maxDestroyTime)));

        poolObject.Return();
    }