예제 #1
0
    private IEnumerator Disappear()
    {
        float soundEndingTime = thisHexagon.GetAudioSource().clip.length;

        if (destructionDelay < soundEndingTime)
        {
            yield return(new WaitForSeconds(destructionDelay));

            transform.GetChild(0).gameObject.SetActive(false);
            yield return(new WaitForSeconds(soundEndingTime - destructionDelay));

            thisHexagon.DestroyHexagon(false, 0);
        }
        else
        {
            thisHexagon.DestroyHexagon(false, destructionDelay);
        }
    }