Пример #1
0
        public override IEnumerator CastBehavior(ITerminal term, IList <string> incantation)
        {
            TryConsumeMirrorMagic.Raise();

            // fun stuff starts here

            yield return(new WaitForSeconds(.5f));

            term.PrintSingleLine(randomAscii(UnityEngine.Random.Range(1, 3)));
            yield return(null);

            term.PrintSingleLine(randomAscii(UnityEngine.Random.Range(2, 4)));
            yield return(null);

            yield return(new WaitForSeconds(1));

            float timer = 1;
            int   max   = 4;

            while (timer > 0)
            {
                term.PrintSingleLine(randomAscii(UnityEngine.Random.Range(1, max / 2)));
                max   += 2;
                timer -= Time.deltaTime;
                yield return(null);
            }

            yield return(new WaitForSeconds(1f));

            // end fun stuff

            castAt(getName(incantation));

            yield return(new WaitForSeconds(.3f));
        }
Пример #2
0
        public override IEnumerator CastBehavior(ITerminal term, IList <string> incantation)
        {
            for (int i = 0; i < requiredMirrors; i++)
            {
                TryConsumeMirrorMagic.Raise();
            }

            // fun stuff begins here

            term.PrintEmptyLine();

            yield return(new WaitForSeconds(1.5f));

            for (int i = 0; i < UnityEngine.Random.Range(5, 10); i++)
            {
                term.PrintSingleLine(randomAscii(UnityEngine.Random.Range(13, 37)));
                yield return(null);
            }

            for (int i = 0; i < 3; i++)
            {
                term.PrintEmptyLine();
                yield return(new WaitForSeconds(.3f));
            }

            yield return(new WaitForSeconds(.4f));

            // end fun stuff

            castAt(getName(incantation));
        }