Пример #1
0
 private void UpdateInstructions(string newtext)
 {
     if (instructions.text != newtext)
     {
         instructions.PunchIn(0f);
     }
     instructions.text = newtext;
     instructions.x    = instructionsAnchorX;
     instructions.y    = lines + 1;
     instructions.GoFromRight();
 }
Пример #2
0
    public override void Update()
    {
        waiter -= Time.unscaledDeltaTime;

        if (waiter < 0)
        {
            waiter = .5f;

            if (!ticker)
            {
                super.hidden = false;
                hot.hidden   = true;

                super.PunchIn(.8f);
            }
            else
            {
                super.hidden = true;
                hot.hidden   = false;

                hot.PunchIn(.8f);
            }

            ticker = !ticker;
        }
        base.Update();
    }
Пример #3
0
    public override void ReactToInputKeyboard(SHGUIinput key)
    {
        if (fadingOut)
        {
            return;
        }

        base.ReactToInputKeyboard(key);

        if (key == SHGUIinput.any)
        {
            if (subElement != null && subElement.text != LocalizationManager.Instance.GetLocalized("TYPE_TO_HACK_INPUT"))
            {
                subElement.PunchIn(.6f);
            }
        }
    }
Пример #4
0
    void AddText(string line)
    {
        var    lines     = line.Split(';');
        string firstline = lines[0];

        thisLineDelay = .8f;

        if (firstline.Contains(">"))
        {
            int index = firstline.IndexOf('>');
            var cmd   = firstline.Substring(0, index);
            lines[0] = firstline.Substring(index + 1);

            for (int i = 0; i < cmd.Length; ++i)
            {
                if (cmd[i] == 'D')
                {
                    this.thisLineDelay *= 1.2f;
                }
            }
        }

        foreach (var L in text)
        {
            L.Kill();
            L.remove = true;
        }

        int height = 0;

        foreach (var l in lines)
        {
            var t = new SHGUItext(SHGUI.current.GetASCIIartFromFont(l), 0, 0, 'w');

            t.x = (int)(SHGUI.current.resolutionX / 2) - (int)(t.GetLineLength() / 2);
            t.y = (int)(SHGUI.current.resolutionY / 2) - (int)(t.CountLines() / 2) + height;
            AddSubView(t);
            height += (int)(SHGUI.current.resolutionY / 2) - (int)(t.CountLines() / 2) - 1;
            t.PunchIn(1f);

            text.Add(t);
        }

        foreach (var t in text)
        {
            t.y -= (int)(height / 4);
        }

        PlaySound();
    }
Пример #5
0
    private void SetChatQuitInstructions(string newtext)
    {
        if (chatQuitInstructions == null)
        {
            return;
        }

        chatQuitInstructions.color = 'z';

        if (chatQuitInstructions.text != newtext)
        {
            chatQuitInstructions.PunchIn(0f);
        }

        chatQuitInstructions.text = newtext;
        chatQuitInstructions.x    = SHGUI.current.resolutionX - 5;
        chatQuitInstructions.GoFromRight();
    }