Esempio n. 1
0
    IEnumerator ResetTrap()
    {
        yield return(new WaitForSeconds(gameplay.delayBeforeTransition));

        while (gameplay.rotateLerpValue > 0)
        {
            yield return(null);
        }
        yield return(new WaitForSeconds(gameplay.delayBeforeTransitionReturn));

        while (gameplay.rotateLerpValue < 1)
        {
            yield return(null);
        }
        gameplay.IsMoving            = false;
        gameplay.hasADelayedRotation = false;
        gameplay.isRotating          = false;
        gameplay.ResetPlatformToOrigin();

        isTrapEnabled = false;
        Material mat = GetComponentInChildren <MeshRenderer>().material;

        mat.SetColor("_EmissionColor", Color.white);
        yield return(null);
    }