Ejemplo n.º 1
0
        private IEnumerator InternalClose()
        {
            FizzleBarrier fizzleBarrier = this;

            fizzleBarrier.glass.gameObject.SetActive(true);
            while (fizzleBarrier.glass.transform.localPosition.y < 0.5F * fizzleBarrier.glass.transform.localScale.y)
            {
                fizzleBarrier.glass.transform.localPosition += 0.5F * fizzleBarrier.glass.transform.up;
                yield return(new WaitForFixedUpdate());
            }

            fizzleBarrier.glass.transform.localPosition = 0.5F * fizzleBarrier.glass.transform.localScale.y * fizzleBarrier.glass.transform.up;
        }
Ejemplo n.º 2
0
        private IEnumerator InternalOpen()
        {
            FizzleBarrier fizzleBarrier = this;

            while (fizzleBarrier.glass.transform.localPosition.y > -0.5F * fizzleBarrier.glass.transform.localScale.y)
            {
                fizzleBarrier.glass.transform.localPosition -= 0.5F * fizzleBarrier.glass.transform.up;
                yield return(new WaitForFixedUpdate());
            }

            fizzleBarrier.glass.transform.localPosition = -0.5f * fizzleBarrier.glass.transform.localScale.y * fizzleBarrier.glass.transform.up;
            fizzleBarrier.glass.gameObject.SetActive(false);
        }