예제 #1
0
    public APPmessage SetRed()
    {
        frame.SetColorRecursive('r');
        text.SetColorRecursive('r');
        instructions1.SetColorRecursive('r');
        instructions2.SetColorRecursive('r');

        color = 'r';
        return(this);
    }
예제 #2
0
    void UpdateCurrentPhase()
    {
        if (phase == 0)           //brain gets scanned in Redraw(...)
        {
            if (Progress(10f))
            {
                AddSubView(brainView);
            }
        }
        else if (phase == 1)             //memory is prepared
        {
            if (Progress(1f))
            {
                AddSubView(memoryFrame);

                memoryFrame.x = cypherBrainView.x;
                memoryFrame.y = cypherBrainView.y;
            }
        }
        else if (phase == 2)             //brain and memory converge
        {
            if (!Wait(1.5f))
            {
                return;
            }
            ShowPopup(" Are you sure? ");

            brainView.x       = (int)Mathf.Lerp(brainViewSideX, brainViewCenterX, progress);
            cypherBrainView.x = (int)Mathf.Lerp(cypherBrainViewSideX, cypherBrainViewCenterX, progress);
            memoryFrame.x     = cypherBrainView.x;
            if (Progress(2f))
            {
                brainView.x       = brainViewCenterX;
                cypherBrainView.x = cypherBrainViewCenterX;
                memoryFrame.x     = cypherBrainView.x;
                SetSubtitle(" you may experience\n slight discomfort ", 'z');
            }
        }
        else if (phase == 3)             //brain dump in Redraw(...)
        {
            if (!Wait(0.5f))
            {
                return;
            }
            Progress(4f);
        }
        else if (phase == 4)             //brain dump in Redraw(...)
        {
            if (!Wait(0.5f))
            {
                return;
            }
            Progress(4f);
        }
        else if (phase == 5)             //brain dump in Redraw(...)
        {
            if (!Wait(0.5f))
            {
                return;
            }
            Progress(4f);
        }
        else if (phase == 6)             //brain dump in Redraw(...)
        {
            if (!Wait(0.5f))
            {
                return;
            }
            if (Progress(4f))
            {
                SetSubtitle("", 'w');
                cypherBrainView.text = SHGUI.current.GetASCIIartByName("CypherBrain01");
                AddSubView(brainCover);

                brainCover.x = brainView.x;
                brainCover.y = brainView.y;

                AddSubView(cypherBrainView);
            }
        }
        else if (phase == 7)             // brain and memory diverge
        {
            if (!Wait(2f))
            {
                return;
            }

            brainView.x       = (int)Mathf.Lerp(brainViewCenterX, brainViewSideX, progress);
            cypherBrainView.x = (int)Mathf.Lerp(cypherBrainViewCenterX, cypherBrainViewSideX, progress);
            memoryFrame.x     = cypherBrainView.x;
            brainCoverItself.SetChar(GetPulsatingChar());

            brainCover.x = brainView.x;
            brainCover.y = brainView.y;

            if (Progress(2.5f))
            {
                brainView.x       = brainViewSideX;
                cypherBrainView.x = cypherBrainViewSideX;
                memoryFrame.x     = cypherBrainView.x;
            }
        }
        else if (phase == 8)             //connection persists
        {
            brainCover.x = brainView.x;
            brainCover.y = brainView.y;
            memoryFrameGlow.SetChar(GetPulsatingChar());
            brainCoverItself.SetChar(GetPulsatingChar());

            Progress(2f);
        }
        else if (phase == 9)             //connection blinks fast for a moment

        {
            memoryFrameGlow.SetChar(GetPulsatingChar(10f));
            brainCoverItself.SetChar(GetPulsatingChar(10f));

            Progress(.5f);
        }
        else if (phase == 10)             //connection disappears brain half-empty; brain dies

        {
            memoryFrameGlow.SetChar(' ');
            brainCoverItself.SetChar(' ');

            if (Progress(2f))
            {
                brainView.Kill();
                brainView.overrideFadeOutSpeed = .15f;
            }
        }
        else if (phase == 11)
        {
            if (!Wait(2.5f))
            {
                return;
            }

            cypherBrainView.x = (int)Mathf.Lerp(cypherBrainViewSideX, cypherBrainViewCenterX, progress);
            memoryFrame.x     = cypherBrainView.x;

            if (Progress(2.5f))
            {
                if (brainCover != null)
                {
                    brainCover.Kill();
                }
                cypherBrainView.x = cypherBrainViewCenterX;
                memoryFrame.x     = cypherBrainView.x;
            }
        }
        else if (phase == 12)
        {
            if (Progress(2f))
            {
                memoryFrame.SetColorRecursive('r');
                outflowView = AddSubView(new SHGUIoutflow()) as SHGUIoutflow;
            }
        }
        else if (phase == 13)
        {
            if (!Wait(.3f))
            {
                return;
            }

            outflowView.AddSeeds();

            if (Progress(2f))
            {
                memoryFrame.AddSubView(new SHGUIrect(-1, 2, -1, 2));
                outflowView.DestroyBarrier();
            }
        }
        else if (phase == 14)
        {
            outflowView.DestroyBarrier();
            if (cypherBrainView != null && !cypherBrainView.fadingOut)
            {
                cypherBrainView.Kill();
            }

            if (Progress(1.2f))
            {
                outflowView.AddLimit();
            }
        }
        else if (phase == 15)
        {
            outflowView.AddLimit();            //dla pewności
            if (!Wait(1.5f))
            {
                return;
            }

            if (memoryFrame != null)
            {
                memoryFrame.Kill();
            }

            if (Progress(4.2f))
            {
                outflowView.Kill();
                Kill();
                SHGUI.current.AddViewOnTop(new APPrecruit());
            }
        }
        else if (phase == 16)
        {
            if (Progress(10f))
            {
            }
        }
        else if (phase == 60)           //only copy exists
        {
            if (Progress(5))
            {
                //Kill ();
            }
        }
        else             // skip empty phases
        {
            Progress(-1f);
        }
    }